Quick answers
- Is CVE-2026-40606 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40606 being exploited in the wild.
- How severe is CVE-2026-40606?
- Medium severity, with a CVSS score of 4.8, published 21 April 2026.
- Which products and versions are affected?
- mitmproxy (PyPI) <= 12.2.1, ECOSYSTEM:introduced=0,fixed=12.2.2.
- Is there a fix for CVE-2026-40606?
- Yes. mitmproxy (PyPI): upgrade to 12.2.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40606 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-40606?
- Check whether you run Mitmproxy or mitmproxy (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- mitmproxy (PyPI): upgrade to 12.2.2 or later
pip install "mitmproxy>=12.2.2"
Technical details
An LDAP injection vulnerability (CWE-90) exists in mitmproxy versions 12.2.1 and below. The root cause is the improper neutralization of special characters in the username field when constructing LDAP queries for proxy authentication. A remote attacker can exploit this by providing a malicious username that alters the logic of the LDAP query, leading to an authentication bypass. This vulnerability only affects instances where the 'proxyauth' option is explicitly configured to use LDAP. The issue is resolved in version 12.2.2.
Affected products
- mitmproxy mitmproxy <= 12.2.1
Identifiers
- CVE-2026-40606
- GHSA-527g-3w9m-29hv
- PYSEC-2026-92
Timeline
- 2025-12-08: disclosed: Initial report received from researcher
- 2026-04-12: patched: Patch and advisory published
- 2026-04-14: advisory: GitHub Advisory published