CVE-2021-39214: Lacking Protection against HTTP Request Smuggling in mitmproxy

Published Sep 16, 2021
·
Updated

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.

Patches

The vulnerability has been fixed in mitmproxy 7.0.3 and above.

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.

Other sources

mitmproxy is an interactive, SSL/TLS-capable intercepting proxy. 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 a smuggled request is still captured as part of another request's body, 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 one uses mitmproxy to protect an HTTP/1 service, no action is required. The vulnerability has been fixed in mitmproxy 7.0.3 and above.

Affected Software

2 affected componentsFixes available
pip/mitmproxy<7.0.3
7.0.3
mitmproxy mitmproxy<=7.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/mitmproxy to a version that resolves this vulnerability.

    Fixed in 7.0.3
  2. Upgrade

    Upgrade mitmproxy to a version that resolves this vulnerability.

    Fixed in 7.0.3
  3. Compensating control

    If you use mitmproxy to protect an HTTP/1 service, mitigate by upgrading mitmproxy to a version where HTTP request smuggling is fixed (mitmproxy 7.0.3 and above). If you do not use mitmproxy to protect an HTTP/1 service, no action is required per the advisory.

Event History

Sep 16, 2021
CVE Published
via MITRE·03:10 PM
Data Sourced
via MITRE·03:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeaknessAffected Software
Sep 20, 2021
Advisory Published
via GitHub·07:53 PM

Frequently Asked Questions

1

What is the severity of CVE-2021-39214?

CVE-2021-39214 has a medium severity rating due to the potential for HTTP request smuggling attacks.

2

How do I fix CVE-2021-39214?

To fix CVE-2021-39214, upgrade mitmproxy to version 7.0.3 or higher.

3

Which versions of mitmproxy are affected by CVE-2021-39214?

CVE-2021-39214 affects mitmproxy versions 7.0.2 and below.

4

What type of attack is associated with CVE-2021-39214?

CVE-2021-39214 is associated with HTTP request smuggling attacks.

5

Can a malicious client exploit CVE-2021-39214?

Yes, a malicious client can exploit CVE-2021-39214 to perform HTTP request smuggling.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203