Affected product(s):
| Product | Affected versions | Fix |
| MongoDB C# Driver | 2.5.0 up to, but not including, 3.14.1 | 3.14.1 |
| MongoDB Java Driver | 3.6.0 up to, but not including, 5.13.0 | 5.13.0 (5.15.0 is recommended) |
| MongoDB Node.js Driver | 3.3.3 up to, but not including, 7.8.0 | 7.8.0 |
Only applications that connect with mongodb+srv:// strings are affected; the vendor has not published equivalent flaws for other drivers as of this date.
Description
Two critical vulnerabilities have been reported in the official MongoDB drivers for C# and Java, identified as CVE-2026-129938 and CVE-2026-129932, both with CVSS 9.1, critical. Both affect the validation of DNS SRV records that the drivers query when the application uses a mongodb+srv:// connection string. An unauthenticated attacker who can control or forge those DNS responses can cause the driver to connect to a server outside the authorized domain and under the attacker’s control. The vendor made them public on Nov 19, 2026. This bulletin is classified as CRITICAL.
In the C# driver (CVE-2026-129938), a manipulated SRV record can add an external host to the server list. In the Java driver (CVE-2026-129932), the host name that is validated does not match the one used to connect, and the driver ends up verifying the TLS certificate against the attacker’s server, so encryption does not prevent the attack.
If the attack succeeds, the application’s traffic may pass through the attacker’s server. This can expose database credentials and application data, and allow forged query results to be returned. To exploit these flaws, the attacker needs to control or forge the victim’s DNS SRV responses, for example from the same network or by compromising a DNS server.
The vendor also fixed a similar flaw in the Node.js driver, identified as CVE-2026-126837, with CVSS 9.1, critical, published on Nov 12, 2026. It affects versions from 3.3.3 up to, but not including, 7.8.0. In that case, a flaw in the validation of hosts returned by DNS SRV can redirect the connection to a host outside the expected domain; TLS encryption does not prevent this either. Applications that use mongodb:// strings are not affected by this CVE.
On Nov 19, 2026 the vendor also published other medium-severity flaws in these drivers, which are not the main subject of this bulletin: in C#, CVE-2026-129936, CVSS 5.7, medium, and CVE-2026-129937, CVSS 6.3, medium, both fixed in 3.14.1; in Java, CVE-2026-129931, CVSS 5.7, medium, and CVE-2026-129933, CVSS 6.3, medium, both fixed in 5.15.0.
As of the date of this bulletin, CVE-2026-129938, CVE-2026-129932 and CVE-2026-126837 are not listed in the Known Exploited Vulnerabilities catalog and no public proof of concept was identified. No active exploitation is known.
Mitigation
Inventory applications that use the official MongoDB drivers for C#, Java or Node.js with mongodb+srv:// strings, and record the version of each driver.
The fix is to update to the versions listed in Solution. The vendor did not publish a workaround.
As an exposure-reduction measure, and not as a vendor workaround, use trusted internal DNS resolvers, and DNSSEC where possible, to make it harder to forge SRV responses. While updating, consider using mongodb:// strings with an explicit host list, which avoids the SRV lookup. If DNS manipulation on the network is suspected, rotate the database credentials.
Solution
The solution is to update the drivers to the versions published by the vendor, or to a later one:
- MongoDB C# Driver: 3.14.1 or later, published on Nov 19, 2026. This version also fixes CVE-2026-129936 and CVE-2026-129937. It introduces a breaking change: the
ToString()method ofMongoUrl,MongoUrlBuilderandConnectionStringnow returns the URL with sensitive data hidden (<redacted>). Code that uses thatToString()result as a connection string, key or identifier will break and must be adjusted: forMongoUrl, useurl.Url; forMongoUrlBuilder,builder.ToMongoUrl().Url; forConnectionString, keep the original string, because there is no public way to recover the unredacted string. - MongoDB Java Driver: CVE-2026-129932 has been fixed since 5.13.0, published on Sep 25, 2026; installations on that version or later are already protected against this CVE. Updating to 5.15.0 or later, published on Nov 19, 2026, is recommended, as it also fixes CVE-2026-129931 and CVE-2026-129933.
- MongoDB Node.js Driver: 7.8.0 or later.
The vendor did not publish a workaround.
For information on how to update, visit the following link:
https://github.com/mongodb/mongo-csharp-driver/releases/tag/v3.14.1
Additional information:
- Vendor — C# driver 3.14.1 release notes:
https://github.com/mongodb/mongo-csharp-driver/releases/tag/v3.14.1 - Vendor — ticket CSHARP-6283:
https://jira.mongodb.org/browse/CSHARP-6283 - Vendor — Java driver 5.15.0 release notes:
https://github.com/mongodb/mongo-java-driver/releases/tag/r5.15.0 - Vendor — Java driver 5.13.0 release notes:
https://github.com/mongodb/mongo-java-driver/releases/tag/r5.13.0 - Vendor — ticket JAVA-6347 (restricted access):
https://jira.mongodb.org/browse/JAVA-6347 - Vendor — Node.js driver 7.8.0 release notes:
https://github.com/mongodb/node-mongodb-native/releases/tag/v7.8.0 - Vendor — ticket NODE-7830:
https://jira.mongodb.org/browse/NODE-7830 - Security advisory — GHSA-wxhh-83v3-fv58 (C# driver):
https://github.com/advisories/GHSA-wxhh-83v3-fv58 - NVD — CVE-2026-129938:
https://nvd.nist.gov/vuln/detail/CVE-2026-129938 - NVD — CVE-2026-129932:
https://nvd.nist.gov/vuln/detail/CVE-2026-129932 - NVD — CVE-2026-126837:
https://nvd.nist.gov/vuln/detail/CVE-2026-126837 - CERT-PY — vulnerabilities in MongoDB products:
https://www.cert.gov.py/vulnerabilidades-en-productos-mongodb-6/ - Known Exploited Vulnerabilities catalog:
https://www.cisa.gov/known-exploited-vulnerabilities-catalog - Alert 2026-154 — a distinct flaw in MongoDB Server:
https://beaconlab.us/en/publication/alert-2026-154-unauthenticated-use-after-free-in-mongodb-server-replication/