Skip to main content

mitmproxy CVE-2026-40606

MEDIUM
LDAP Injection (CWE-90)
2026-04-21 security-advisories@github.com
4.8
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

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

  1. Access
    Connect to mitmproxy proxy port
  2. Delivery
    Send LDAP injection payload in username field
  3. Exploit
    Injected username modifies LDAP filter logic
  4. Execution
    Authentication check bypassed
  5. Impact
    Unauthorized proxy access granted

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization LDAP query parameterization
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The LDAP proxyauth option must be explicitly enabled and configured in mitmproxy. Specifically, the proxyauth setting must use LDAP as the authentication backend, which is NOT the default configuration. Remote attackers can connect to the proxy port without pre-existing authentication, and the vulnerability exploits the LDAP filter construction during the authentication handshake. Non-LDAP authentication methods and default configurations (proxyauth disabled) are not affected. The attack occurs during the client's initial connection and authentication phase.

Impact

This vulnerability presents moderate risk with important context: CVSS 4.8 with network attack vector (AV:N), high complexity (AC:H), no privileges required (PR:N), and no user interaction needed reflects the baseline severity. However, the real-world risk is significantly constrained by the fact that the LDAP proxyauth option is not enabled by default-only organizations that have explicitly configured LDAP authentication are affected. The AC:H (high complexity) rating suggests the exploitation requires specific conditions or crafted input, which aligns with the LDAP injection nature. No KEV status or active exploitation data is provided, indicating this may be a responsibly disclosed vulnerability without public active exploitation at time of analysis. Organizations using default mitmproxy configurations face zero risk; those using LDAP authentication should prioritize patching. The combination of network accessibility but non-default configuration makes this a targeted rather than widespread risk.

Exploit ScenarioDerived

An attacker crafts a malicious LDAP filter string as the username when connecting to a mitmproxy instance configured with LDAP proxyauth (e.g., username: 'admin*)(|(uid=*' or similar injection payload). The unsanitized username is inserted into the LDAP query, modifying the filter logic to bypass authentication checks and allow the attacker to access proxied traffic without valid credentials.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Apr 21, 2026

Authentication bypass in mitmproxy 12.2.1 and below allows remote attackers to bypass LDAP-based proxy authentication through unsanitized username injection. The vulnerability affects only instances explicitly configured with the proxyauth option using LDAP authentication, which is disabled by default. Attackers can exploit this over the network without authentication or user interaction to gain unauthorized access to proxied connections.

RemediationAI

Upgrade mitmproxy to version 12.2.2 or above, which contains the fix for LDAP username sanitization. Organizations unable to upgrade immediately should disable the proxyauth LDAP feature if not critical to operations, or implement a non-LDAP authentication method. Additional compensating controls include restricting network access to the mitmproxy proxy port using firewall rules to limit which clients can reach the authentication endpoint, though this may impact legitimate use cases. Verify the upgrade using the GitHub security advisory GHSA-527g-3w9m-29hv.

Affected Packages

pypi mitmproxy fix: 12.2.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

mitmproxy's builtin LDAP proxy authentication mechanism (enabled via the proxyauth option with LDAP configuration) constructs LDAP queries using client-supplied usernames without proper sanitization. The vulnerability root cause is CWE-90 (Improper Neutralization of Special Elements used in an LDAP Query), allowing attackers to inject LDAP filter syntax into authentication queries. This enables bypassing the authentication check by manipulating the LDAP filter logic, similar to SQL injection attacks but targeting LDAP directory services. The affected component is the LDAP authentication handler in mitmproxy's proxy authentication subsystem.

Know when Mitmproxy 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

GitHub Advisory PRIMARY 4.8 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
SUSE MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch released
Apr 21, 2026 - 20:30 nvd
Patch available
CVE Published
Apr 21, 2026 - 18:16 nvd
MEDIUM 4.8

DescriptionGitHub Advisory

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 90% exploitable
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Affected Products (CPE)GitHub Advisory

cpe:2.3:a:mitmproxy:mitmproxy:*:*:*:*:*:*:*:*

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
openSUSE Tumbleweed Fixed

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