CVE-2026-126837

Attacker able to redirect a client's database traffic to a host they control via special characters in an SRV target, bypassing the SRV parent-domain guard

Published Nov 12, 2026 CVSS 4.0 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
A validation flaw in the DNS SRV host discovery of the MongoDB Node.js driver may cause the driver to connect to a host outside the expected domain. For a mongodb+srv:// connection string, the driver checks each host name in the DNS SRV response against the domain of the connection string. The driver then builds the connection address from the original name, in which certain characters end the host name early. An unauthenticated party who can forge or change the DNS SRV response may redirect the connection to a host of their choice. TLS does not prevent this, because the driver verifies the server certificate against the redirected host name. This may result in unintended disclosure of application data and authentication credentials, and in altered query results. Applications that use mongodb:// connection strings are not affected.

Analysis

AI-generated

Technical impact

A flaw in the MongoDB Node.js Driver’s DNS SRV host discovery allows an attacker to redirect a client’s database traffic to a host they control, bypassing the domain guard. The driver validates each host name in the SRV response only against the domain of the connection string and then reconstructs the connection address using the original host name. Certain characters can prematurely end the host name, enabling an unauthenticated attacker who can forge or modify the DNS SRV response to redirect the connection to an arbitrary host. Because TLS verification is performed against the redirected host name, encryption does not prevent this manipulation, leading to unintended disclosure of application data and credentials and to altered query results. The weakness is identified as CWE‑180.

Affected Systems

The issue affects the MongoDB Node.js Driver for all released versions that accept "mongodb+srv://" connection strings. Applications that use the standard "mongodb://" connection strings are not impacted, and the problem is tied specifically to the driver’s handling of SRV-based URLs rather than to the underlying database server. The affected vendor is MongoDB, and the product is the Node.js Driver; no specific version range is provided in the CNA data.

Risk and Exploitability

The vulnerability carries a CVSS score of 9.1, indicating a high severity assessment. However, the EPSS probability is reported as less than 1%, suggesting that the likelihood of active exploitation is currently very low. The vulnerability is not listed in CISA’s KEV catalog. Because the attack requires an attacker capable of altering DNS SRV responses, the primary vector is a compromised or malicious DNS server or a spoofed DNS response, and no authentication is required on the client side. TLS does not mitigate the issue because hostname verification is performed after the redirect. Overall, the risk is high in environments with untrusted DNS, but the opportunity for exploitation is limited by the need to compromise DNS infrastructure.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the MongoDB Node.js Driver to the most recent patch that corrects the SRV host validation logic.
  • Reconfigure applications to use explicit host and port connection strings (mongodb://) instead of SRV-based strings until a fix is available.
  • Implement network or DNSSEC controls to ensure that only trusted SRV records are returned for the domain used by the application.

Generated by OpenCVE AI on November 13, 2026 at 17:07 UTC.

Tracking

Sign in to view the affected projects.

Exploits

Explore public exploit intelligence with OpenCVE Pro.

Advisories

No advisories available
References
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Mongodb
Mongodb node.js Driver
Vendors & Products Mongodb
Mongodb node.js Driver
Type Values Removed Values Added
Weaknesses CWE-88
Type Values Removed Values Added
Weaknesses CWE-180
Type Values Removed Values Added
Description A validation flaw in the DNS SRV host discovery of the MongoDB Node.js driver may cause the driver to connect to a host outside the expected domain. For a mongodb+srv:// connection string, the driver checks each host name in the DNS SRV response against the domain of the connection string. The driver then builds the connection address from the original name, in which certain characters end the host name early. An unauthenticated party who can forge or change the DNS SRV response may redirect the connection to a host of their choice. TLS does not prevent this, because the driver verifies the server certificate against the redirected host name. This may result in unintended disclosure of application data and authentication credentials, and in altered query results. Applications that use mongodb:// connection strings are not affected.
Title Attacker able to redirect a client's database traffic to a host they control via special characters in an SRV target, bypassing the SRV parent-domain guard
Weaknesses CWE-88
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 9.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-180

    Incorrect Behavior Order: Validate Before Canonicalize

Sources

Status
PUBLISHED
Assigner
mongodb
Published
Updated
Nov 13, 2026, 6:56 PM
Reserved
Nov 11, 2026, 9:48 PM
Status
Awaiting Analysis
Published
Nov 12, 2026, 5:17 PM
Modified
Nov 13, 2026, 7:19 PM