CVE-2021-39214
JSON

8.1high

Lacking Protection against HTTP Request Smuggling in mitmproxy

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
1.28% (higher than 70% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-22gh-3r9q-xf38PYSEC-2021-328

Description

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

Product or packageVersionsReported by
mitmproxy mitmproxy< 7.0.3, up to 7.0.2CVE List, NVD
mitmproxy (PyPI)before 7.0.3GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.1critical CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

GitHub Advisory Database
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.
NVD (es)

mitmproxy es un proxy interactivo con capacidad de interceptación SSL/TLS. En mitmproxy versiones 7.0.2 y por debajo, un cliente o servidor malicioso es capaz de llevar a cabo ataques de contrabando de peticiones HTTP mediante mitmproxy. Esto significa que un cliente/servidor malicioso podría pasar de contrabando una petición/respuesta mediante mitmproxy como parte del cuerpo del mensaje HTTP de otra petición/respuesta. Mientras que una petición de contrabando sigue siendo capturada como parte del cuerpo de otra petición, no aparece en la lista de peticiones y no pasa por los ganchos de eventos habituales de mitmproxy, donde los usuarios pueden haber implementado comprobaciones de control de acceso personalizadas o saneo de entradas. A menos que se use mitmproxy para proteger un servicio HTTP/1, no es requerida ninguna acción. La vulnerabilidad ha sido corregida en mitmproxy versiones 7.0.3 y superiores

References

Sources

SourceRecordLicence
CVE ListCVE-2021-39214 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-22gh-3r9q-xf38 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-39214 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-328 changed 2023-11-08CC-BY-4.0