CVE-2021-39214

CVE-2021-39214 is a critical-severity security vulnerability in mitmproxy (pip), affecting versions < 7.0.3. It is fixed in 7.0.3.

Summary

Acknowledgements

We thank João Sobral (@chinchila) for responsibly disclosing this vulnerability to the mitmproxy team.

Timeline

  • 2021-09-08: Received initial report for mitmproxy <= 6.0.2.
  • 2021-09-08: Requested clarification if 7.x is affected.
  • 2021-09-10: Received additional details, 7.x situation still unclear.
  • 2021-09-13: Internally determined that 7.x is also affected.
  • 2021-09-13: Shared initial fix with researcher.
  • 2021-09-14: Received confirmation that fix is working, but H2.TE/H2.CL should also be looked at.
  • 2021-09-14: Shared revised fix that includes additional H2.TE mitigations.
  • 2021-09-14: Received confirmation that revised fix is working.
  • 2021-09-16: Completed internal patch review.
  • 2021-09-16: Published patch release and advisory.

Impact

In mitmproxy 7.0.2 and below, a malicious client or server is able to perform HTTP request smuggling attacks through mitmproxy. This means that a malicious client/server could smuggle a request/response through mitmproxy as part of another request/response's HTTP message body. While mitmproxy would only see one request, the target server would see multiple requests. A smuggled request is still captured as part of another request's body, but it does not appear in the request list and does not go through the usual mitmproxy event hooks, where users may have implemented custom access control checks or input sanitization.

Unless you use mitmproxy to protect an HTTP/1 service, no action is required.

CVE-2021-39214 has a CVSS score of 8.1 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (7.0.3); upgrading removes the vulnerable code path.

Affected versions

mitmproxy (< 7.0.3)

Security releases

mitmproxy → 7.0.3 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

The vulnerability has been fixed in mitmproxy 7.0.3 and above.

Frequently Asked Questions

  1. What is CVE-2021-39214? CVE-2021-39214 is a critical-severity security vulnerability in mitmproxy (pip), affecting versions < 7.0.3. It is fixed in 7.0.3.
  2. How severe is CVE-2021-39214? CVE-2021-39214 has a CVSS score of 8.1 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of mitmproxy are affected by CVE-2021-39214? mitmproxy (pip) versions < 7.0.3 is affected.
  4. Is there a fix for CVE-2021-39214? Yes. CVE-2021-39214 is fixed in 7.0.3. Upgrade to this version or later.
  5. Is CVE-2021-39214 exploitable, and should I be worried? Whether CVE-2021-39214 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2021-39214 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2021-39214? Upgrade mitmproxy to 7.0.3 or later.

Other vulnerabilities in mitmproxy

CVE-2025-23217CVE-2022-24766CVE-2021-39214CVE-2018-14505

Stop the waste.
Protect your environment with Kodem.