NoSQL injection in MongoDB Java Driver through raw BSON documents
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 5 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
The MongoDB Java Driver from 5.8.0 before 5.14.0 is affected. Its BSON encoder does not check that the declared length of an external raw document matches the byte range it is given (CWE-943). A remote attacker who can influence bytes that the application wraps in such a document can make the database read trailing content as extra command fields, changing data read or written under the application's credentials. No authentication or user interaction is required.
Written with Claude Haiku 5.5 from the sources below · 2026-10-30
Description from the CNA
A BSON encoding component of the MongoDB Java Driver does not verify that an externally supplied raw document's self-declared length agrees with the extent of the byte range it is given before that range is copied into an outgoing database command. An application that wraps untrusted raw bytes in such a document and uses it as part of a command can therefore emit a structurally inconsistent message, causing the database to interpret attacker-supplied trailing content as additional fields of the surrounding command. No authentication to the driver or database is required beyond the ability to influence those bytes through the victim application, and no user interaction is needed. The result is unintended modification of the command actually executed, which can alter the data read or written under the application's credentials.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update MongoDB Java Driver to version 5.14.0. The sources list no fixed version for Exploit Intelligence, Red Hat Fuse 7, Red Hat build of Apache Camel 4 for Quarkus 3, Red Hat build of Debezium 3 or Red Hat build of Quarkus.
Written with Claude Haiku 5.5 from the sources below · 2026-10-30
- Fix · CNA Java Driver (MongoDB) Fixed in 5.14.0
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Exploit Intelligence | Affected | No fix planned: Out of support scope |
| Red Hat Fuse 7 | Affected | No fix planned: Out of support scope |
| Red Hat build of Apache Camel 4 for Quarkus 3 | Affected | No fix yet: Fix deferred |
| Red Hat build of Debezium 3 | Affected | No fix yet: Fix deferred |
| Red Hat build of Quarkus | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-28 Threatist record created from CVE-2026-118581
- 2026-10-30 Priority changed: MEDIUM → LOW
- 2026-10-30 Affected versions changed · Red Hat
- 2026-10-30 CVSS score added · Red Hat
- 2026-11-05 CISA SSVC decision points changed
References
More MongoDB vulnerabilities
- TI-2019-08023 Code injection in mongo-express KEVCVSS 3.1CRITICAL 9.9
- TI-2025-13542 Zlib compressed protocol header length confusion may allow memory read KEVCVSS 4.0HIGH 8.7
- TI-2026-79432 BSON output corruption via out-of-range binary subtype in MongoDB C# Driver CVSS 4.0MEDIUM 6.9
- TI-2026-79424 NoSQL command injection via mismatched BSON length in MongoDB C# Driver CVSS 4.0MEDIUM 6.9
- TI-2026-79422 Unbounded memory growth in MongoDB C# Driver BSON deserialization CVSS 4.0HIGH 8.2
- TI-2026-79427 Authentication bypass via issuer-and-serial-only certificate equality CVSS 4.0HIGH 7.6
Sources
- CVE-2026-118581 · CVE Program
- CVE-2026-118581 · NVD
- FIRST EPSS
- CVE-2026-118581 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences