Skip to content

Insufficient Protection against HTTP Request Smuggling in mitmproxy

Critical severity GitHub Reviewed Published Mar 19, 2022 in mitmproxy/mitmproxy • Updated Aug 24, 2023

Package

pip mitmproxy (pip)

Affected versions

< 8.0.0

Patched versions

8.0.0

Description

Impact

In mitmproxy 7.0.4 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 8.0.0 and above.

Acknowledgements

We thank Zeyu Zhang (@zeyu2001) for responsibly disclosing this vulnerability to the mitmproxy team.

Timeline

  • 2022-03-15: Received initial report.
  • 2022-03-15: Verified report and confirmed receipt.
  • 2022-03-16: Shared patch with researcher.
  • 2022-03-16: Received confirmation that patch is working.
  • 2022-03-19: Published patched release and advisory.

References

@mhils mhils published to mitmproxy/mitmproxy Mar 19, 2022
Published by the National Vulnerability Database Mar 21, 2022
Published to the GitHub Advisory Database Mar 22, 2022
Reviewed Mar 22, 2022
Last updated Aug 24, 2023

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS score

0.191%
(57th percentile)

Weaknesses

CVE ID

CVE-2022-24766

GHSA ID

GHSA-gcx2-gvj7-pxv3

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.