CVE-2026-40606 ProxyAuth Addon LDAP Injection in mitmproxy

Medium 4.8 Published Updated

Attackers can bypass authentication in mitmproxy's LDAP proxy auth feature by injecting malicious LDAP queries via unsanitized usernames.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40606?

CVE-2026-40606 is a medium-severity authentication bypass vulnerability in mitmproxy, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

mitmproxy is a interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers and mitmweb is a web-based interface for mitmproxy. In 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. Only mitmproxy instances using the proxyauth option with LDAP are affected. This option is not enabled by default. The vulnerability has been fixed in mitmproxy 12.2.2 and above.

Weakness: CWE-90

Which versions are affected by CVE-2026-40606?

3 open source packages ship an affected version, including mitmproxy. It affects 1 product.

PackageAffectedFixed in
mitmproxy PyPIAll versions12.2.2
mitmproxy PyPIAll versions12.2.2
mitmproxy PyPIAll versions12.2.2
Linux distribution packages (1)
python-mitmproxy openSUSE:TumbleweedAll versions12.2.2-1.1

Products include Mitmproxy Mitmproxy.

How do I fix CVE-2026-40606?

Upgrade mitmproxy to 12.2.2 or later.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2026-40606 being exploited?

There is no known exploitation of CVE-2026-40606 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-40606, GHSA-527g-3w9m-29hv, PYSEC-2026-92, UBUNTU-CVE-2026-40606, openSUSE-SU-2026:10622-1.

Is CVE-2026-40606 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free