CVE-2026-96748

Connection redirection via percent-encoded delimiter injection in connection string hosts

Published Sep 24, 2026 CVSS 4.0 · 8.3 High EPSS < 1% KEV · Not listed
Description
PyMongo's connection string parsing decodes percent-encoded characters in the host portion before the host list is separated on its delimiters. When an application places a hostname value supplied by an unauthenticated party into a connection string, that party may cause additional servers of their choosing to be added to the application's database client. The application may then send its authentication exchange and database operations to one of those servers, which can observe limited information and return altered results.

Analysis

AI-generated

Technical impact

The flaw exists because PyMongo decodes percent‑encoded characters in the host portion of a connection string before it splits the host list on its delimiters. When an application inserts a hostname that an unauthenticated party can influence into the connection string, the driver may add additional, attacker‑controlled servers to its database client. As the client initializes authentication and sends database operations, those rogue servers can observe limited request data and return crafted responses, allowing an attacker to alter query results or glean sensitive information. This enables unauthorized data manipulation and potential data leakage.

Affected Systems

MongoDB’s official Python driver, PyMongo, is impacted when it processes host values containing percent‑encoded delimiters prior to host splitting. All driver releases issued before the 4.18.2 update are vulnerable; the 4.18.2 release onward includes the vendor patch that prevents the premature decoding of host strings.

Risk and Exploitability

The CVSS score of 8.3 marks this vulnerability as high severity. The EPSS score of 0.00257 (< 1%) indicates a very low probability of exploitation, and it is not listed in the CISA KEV catalog. The flaw can be exploited remotely if an attacker can supply a hostname into application configuration or user‑generated data. In such scenarios the attack vector is likely HTTP or configuration‑based injection, with the attacker able to redirect the database client to a malicious server.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the MongoDB Python driver to version 4.18.2 or later, which contains the official vendor patch.
  • Review all application code and configuration that generates or accepts hostname values intended for the driver, and enforce that only trusted, static hostnames are used.
  • Validate or sanitize hostnames before building the connection string by stripping or prohibiting percent‑encoded delimiters.
  • Where possible, block network traffic to untrusted servers through firewall or application layer rules to prevent unintended redirection.

Generated by OpenCVE AI on September 26, 2026 at 01:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4930-1 pymongo security update
Github GHSA Github GHSA GHSA-vp6j-j7w5-5xjj PyMongo: PYTHON-5986 Host injection in PyMongo connection string parsing via percent-encoded delimiters
History
Type Values Removed Values Added
First Time appeared Mongodb
Mongodb python Driver
Vendors & Products Mongodb
Mongodb python Driver
Type Values Removed Values Added
References
Metrics ssvc

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

Type Values Removed Values Added
Description PyMongo's connection string parsing decodes percent-encoded characters in the host portion before the host list is separated on its delimiters. When an application places a hostname value supplied by an unauthenticated party into a connection string, that party may cause additional servers of their choosing to be added to the application's database client. The application may then send its authentication exchange and database operations to one of those servers, which can observe limited information and return altered results.
Title Connection redirection via percent-encoded delimiter injection in connection string hosts
Weaknesses CWE-177
References
Metrics cvssV3_1

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

cvssV4_0

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

Weaknesses
  • CWE-140

    Improper Neutralization of Delimiters

  • CWE-177

    Improper Handling of URL Encoding (Hex Encoding)

Sources

Status
PUBLISHED
Assigner
mongodb
Published
Updated
Sep 24, 2026, 7:12 PM
Reserved
Sep 23, 2026, 3:45 PM
Status
Awaiting Analysis
Published
Sep 24, 2026, 7:17 PM
Modified
Sep 24, 2026, 9:00 PM
Severity
Moderate
Public date
Sep 24, 2026, 6:18 PM