Vulnerabilities in pkg:pypi/mitmproxy
PACKAGECVE-2026-40606 is a MODERATE (CVSS 4.8) mitmproxy has an ldap injection vulnerability (CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')) affecting Mitmproxy libraries in the PyPI ecosystem. The issue involves mitmproxy has an ldap injection. Remediation is available by upgrading affected packages to version 12.2.2.
pkg:pypi/mitmproxy
Vulnerability advisories affecting package pkg:pypi/mitmproxy. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-527g-3w9m-29hv | CVE-2026-40606 | MODERATE | mitmproxy has an LDAP Injection |
| GHSA-63cx-g855-hvv4 | - | MODERATE | mitmproxy binaries embed a vulnerable python-hyper/h2 dependency |
| GHSA-wg33-5h85-7q5p | CVE-2025-23217 | HIGH | Mitmweb API Authentication Bypass Using Proxy Server |
| GHSA-gcx2-gvj7-pxv3 | CVE-2022-24766 | CRITICAL | Insufficient Protection against HTTP Request Smuggling in mitmproxy |
| GHSA-6m53-c78q-7qmg | CVE-2018-14505 | CRITICAL | Mitmweb in mitmproxy allows DNS Rebinding attacks |
| GHSA-22gh-3r9q-xf38 | CVE-2021-39214 | CRITICAL | Lacking Protection against HTTP Request Smuggling in mitmproxy |
CVE-2026-40606 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-40606
To remediate this vulnerability, upgrade all affected Mitmproxy dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mitmproxy>=12.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mitmproxy
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-40606, inspect your installed packages using pip:
pip show mitmproxy
Analyze the terminal output to locate any version of Mitmproxy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.2.2), your application is affected.
Note: The pip show mitmproxy command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'), where the product constructs all or part of an ldap query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended ldap query when it is sent to a downstream component. In Mitmproxy, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-40606 Affected Mitmproxy Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mitmproxy
|
PyPI |
< 12.2.2
|
12.2.2
|
References
Frequently Asked Questions
What is CVE-2026-40606?
Which Mitmproxy versions are affected?
What version fixes CVE-2026-40606?
Is mitmproxy affected?
What is the CVSS score of CVE-2026-40606?
What CWE is associated with CVE-2026-40606?
How can I check PyPI dependencies for CVE-2026-40606?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-527g-3w9m-29hv",
"modified" : "2026-06-06T00:58:36Z",
"published" : "2026-04-14T01:08:52Z",
"aliases" : [ "CVE-2026-40606" ],
"summary" : "mitmproxy has an LDAP Injection",
"details" : "### Impact\nIn mitmproxy 12.2.1 and below, the builtin LDAP proxy authentication does not correctly sanitize the username when querying the LDAP server. This allows a malicious client to bypass authentication.\n\nOnly mitmproxy instances using the `proxyauth` option with LDAP are affected. This option is not enabled by default.\n\n### Patches\n\nThe vulnerability has been fixed in mitmproxy 12.2.2 and above.\n\n### Acknowledgements\n\nWe thank Yue (Knox) Liu (@yueyueL) for responsibly disclosing this vulnerability to the mitmproxy team.\n\n### Timeline\n\n- **2025-12-08**: Received initial report. \n- **2025-12-09**: Verified report and confirmed receipt.\n- **2026-01-02**: Informed researcher that patch will be part of the next regular patch release.\n- **2026-04-12**: Published patch release and advisory.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mitmproxy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "12.2.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 12.2.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mitmproxy/mitmproxy/security/advisories/GHSA-527g-3w9m-29hv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40606"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mitmproxy/mitmproxy"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mitmproxy/PYSEC-2026-92.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-90" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T01:08:52Z",
"nvd_published_at" : "2026-04-21T18:16:52Z"
}
}