Skip to main content

PyMongo CVE-2026-96748

| EUVDEUVD-2026-86347 HIGH
Improper Handling of URL Encoding (Hex Encoding) (CWE-177)
2026-09-24 mongodb GHSA-vp6j-j7w5-5xjj
8.3
CVSS 4.0 · Vendor: mongodb
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply percent-encoded host to app input
  2. Delivery
    App embeds value in Mongo URI
  3. Exploit
    Parser decodes %2C before host-list split
  4. Execution
    Attacker server added to client pool
  5. Persist
    Client sends auth + queries to rogue server
  6. Impact
    Attacker observes data and returns altered results

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization URL encoding handling
Exploitation Conditions

Exploitation requires the application to insert an attacker-controlled or unauthenticated-party-supplied hostname value directly into a PyMongo connection string; it is NOT exploitable against static/hardcoded URIs. The attacker must be able to influence that host field and encode delimiter characters (e.g. '%2C' for comma) so PyMongo's pre-split percent-decoding injects the additional server. This maps to the CVSS 4.0 AT:P requirement - the vulnerable code path (untrusted host interpolation) must exist in the target application, which is the main factor limiting real-world exploitability despite PR:N/UI:N. Additionally the attacker must operate a reachable server to receive the redirected auth exchange and operations. Fixed in PyMongo 4.18.2.

Impact

MongoDB's own CVSS 4.0 rates this 8.3 (High) with AV:N/AC:L/AT:P/PR:N/UI:N and VI:H as the dominant impact - the rogue server returns altered query results, tampering with the data the application acts on. The AT:P (attack requirements: Present) qualifier is the key limiting signal: this is NOT exploitable against a static, hardcoded connection URI. It only triggers when an application concatenates an attacker-supplied hostname into a MongoDB connection string, so real-world risk is entirely gated on that specific coding pattern being present. No EPSS score, no CISA KEV listing, and no public POC were provided, so there is no evidence of active exploitation or automation - the 8.3 reflects impact potential, not observed weaponization. Net: a genuine integrity/tamper concern for the subset of apps that build URIs from untrusted input, but for the majority of deployments using fixed connection strings the practical exposure is low. The primary tag 'Information Disclosure' undersells the flaw - VI:H means data tampering (altered results) is the headline, with information disclosure only a secondary limited effect (VC:L).

Exploit ScenarioDerived

An application builds its MongoDB connection string by inserting a hostname taken from unauthenticated user input (e.g. a tenant/config field). The attacker submits a percent-encoded value such as 'good.example%2Cattacker.example' which, after PyMongo decodes it before splitting on commas, silently adds attacker.example to the client's server list; the app then routes its authentication handshake and queries to the attacker's server, which observes limited data and returns manipulated results. No public exploit code was identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 24, 2026

Attackers can inject arbitrary additional servers into a PyMongo (MongoDB Python Driver) client's connection topology by smuggling the percent-encoded form of a host-list delimiter (for example %2C) inside a hostname value that an application places into a connection string, because PyMongo decodes percent-escapes before it splits the host list. The request is unauthenticated (CVSS 4.0 PR:N) but carries an attack-requirement prerequisite (AT:P): the target application must build a URI at runtime from a host the attacker can influence, meaning static or hardcoded connection strings are not exploitable. MongoDB's own CVSS 4.0 rating of 8.3 (High) is driven by a high integrity impact - the client may route its authentication exchange and subsequent database operations to the rogue host, which can observe limited information and return altered query results. No public exploit code or confirmed active exploitation was identified at time of analysis, and the issue is fixed in PyMongo 4.18.2.

RemediationAI

Upgrade to PyMongo 4.18.2 (vendor-released patch), which corrects the ordering of percent-decoding and host-list splitting so encoded delimiters can no longer introduce hosts; release notes are at https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.2 and https://github.com/mongodb/mongo-python-driver/blob/4.18.2/doc/changelog.rst. If immediate upgrade is not possible, stop interpolating untrusted input into the host portion of a connection string: resolve the attacker-supplied hostname to a single trusted value inside your own application, or validate it against a strict allowlist of known MongoDB endpoints; the trade-off is reduced deployment flexibility and rejection of legitimate multi-host or encoded hostnames. A lighter but weaker mitigation is to reject any candidate hostname containing '%', ',', '/', '?' or '://' before it is placed in the URI, which blocks the encoded-delimiter technique but can be bypassed by alternate encodings and will break legitimate internationalized or encoded hostnames. As a defense-in-depth compensating control, run the client with a least-privilege, short-lived database user and constrain network egress so the process can reach only approved MongoDB servers; this limits what a redirected authentication exchange discloses and how convincing falsified responses are, but it does not remove the integrity impact of a rogue host returning altered results, so the patched driver remains the primary fix.

Affected VersionsENISA

Python Driver 0 <4.18.2

Affected Packages

pypi pymongo fix: 4.18.2
euvd python_driver fix: 4.18.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PyMongo builds a MongoClient from a MongoDB connection URI such as mongodb://host1,host2/db, and parsing occurs in stages: percent-decoding of the host portion happens before the host list is split on its delimiter. Because decoding precedes splitting, bytes that were encoded precisely so they would not be treated as separators are decoded first and then interpreted as a delimiter, so a value like 'evil.example,%2Cattacker.example' collapses into two host entries. This is CWE-177 (Improper Handling of URL Encoding (Hex Encoding)) - an encoding-layer confusion in which untrusted data crosses a parsing boundary it was never meant to cross, and it is a classic example of the general root-cause classes CWE-20 (Improper Input Validation) and CWE-172 (Encoding Error) that CWE-177 specializes. The affected package is the MongoDB Python Driver, identified by CPE cpe:2.3:a:mongodb:python_driver:*:*:*:*:*:*:*:*, at all versions before 4.18.2. The security consequence is amplified by driver topology behavior: once extra hosts are in the seed list, the client may select one of them for the initial handshake and subsequent operations, which is why the injected server can capture the credential exchange and serve falsified responses. The MongoDB-assigned 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 is consistent with the independent assessment (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N): confidentiality is limited, integrity of the application's data view is high, availability is unaffected, and the 'AT:P'/'AC:H' element reflects the code-path prerequisite rather than any authentication barrier.

Know when MongoDB gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mongodb) PRIMARY 8.3 HIGH
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
vuln.today AI 6.5 MEDIUM

AC:H because exploitation depends on the app embedding untrusted host input plus attacker infrastructure; I:H for returned altered results, C:L for limited observation, no availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (mongodb).

CVSS VectorVendor: mongodb

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 24, 2026 - 19:04 EUVD
CVE Published
Sep 24, 2026 - 18:18 cve.org
HIGH 8.3

DescriptionCVE.org

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.

Technical POC Analysis

CWE-177 (Improper Handling of URL Encoding).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

PyMongo, the MongoDB Python driver, contains a high-severity flaw that allows attackers to redirect database traffic to malicious servers when applications dynamically build connection strings from untrusted input, potentially corrupting query results and exposing sensitive data. Organizations that rely on PyMongo for flexible or multi-tenant deployments are most at risk, as successful exploitation could undermine data integrity and customer trust. Leadership should act swiftly to patch affected systems and enforce input validation to prevent unauthorized database routing.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 84% exploitable
Prevalence
High
PyMongo is MongoDB's official and dominant Python driver, extremely widely deployed
Threat Intel
1
1 sources
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

62
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2013-1892 MEDIUM POC
6.0 Oct 01

MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo

CVE-2026-118383 CRITICAL POC
9.5 Nov 10

Use-after-free in MongoDB Server's replication component can terminate replica set members unexpectedly and, under certa

CVE-2013-3969 MEDIUM POC
6.5 Oct 01

The find prototype in scripting/engine_v8.h in MongoDB 2.4.0 through 2.4.4 allows remote authenticated users to cause a

CVE-2018-13863 HIGH POC
7.5 Jul 10

The MongoDB bson JavaScript module (also known as js-bson) versions 0.5.0 to 1.0.x before 1.0.5 is vulnerable to a Regul

CVE-2026-25887 HIGH POC
7.2 Mar 06

Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut

CVE-2019-2386 HIGH POC
7.1 Aug 06

After user deletion in MongoDB Server the improper invalidation of authorization sessions allows an authenticated user's

CVE-2012-6619 MEDIUM POC
6.4 Mar 06

The default configuration for MongoDB before 2.3.2 does not validate objects, which allows remote authenticated users to

CVE-2026-129987 CRITICAL
9.9 Nov 18

Authenticated command injection in Dokploy before 0.31.1 lets any user who can update a MySQL, PostgreSQL, MariaDB, Mong

CVE-2026-3431 CRITICAL
9.8 Mar 02

SimStudio below 0.5.74 has a missing authorization on MongoDB tool endpoints that allows attackers to execute arbitrary

CVE-2024-8654 CRITICAL
9.8 Sep 10

MongoDB Server may access non-initialized region of memory leading to unexpected behaviour when zero arguments are calle

CVE-2024-6376 CRITICAL
9.8 Jul 01

MongoDB Compass may be susceptible to code injection due to insufficient sandbox protection settings with the usage of e

CVE-2024-1351 CRITICAL
9.8 Mar 07

Under certain configurations of --tlsCAFile and tls.CAFile, MongoDB Server may skip peer certificate validation which ma

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP4 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy