Query and rename target confusion via embedded NUL truncation in MongoDB C++ Driver
Impact
The MongoDB C++ Driver discards content after an embedded NUL byte in certain field and collection names accepted by the collection API. This can cause the driver and the calling application to interpret the same name differently. An authenticated actor who can influence a name passed by an affected application can cause the application to read distinct values from an unintended field or rename an unintended collection. These operations use the application's existing database credentials.
Patches
Fixed in C++ driver 4.6.1.
Workarounds
Validate field and collection names for embedded NUL bytes prior to passing into APIs.
References
https://www.cve.org/CVERecord?id=CVE-2026-106430
https://jira.mongodb.org/browse/CXX-3551
https://jira.mongodb.org/browse/CXX-3552
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| MongoDB C++ Driver Product | >= 3.0.0, < 4.6.1 | 4.6.1 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-436