---
id: CVE-2021-39214
aliases:
  - GHSA-22gh-3r9q-xf38
  - PYSEC-2021-328
title: Lacking Protection against HTTP Request Smuggling in mitmproxy
summary: Lacking Protection against HTTP Request Smuggling in mitmproxy
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: mitmproxy
product: mitmproxy
ecosystem: pip
affected:
  - mitmproxy < 7.0.3
patched:
  - mitmproxy 7.0.3
published: '2021-09-20'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-22gh-3r9q-xf38'
references:
  - url: >-
      https://github.com/mitmproxy/mitmproxy/security/advisories/GHSA-22gh-3r9q-xf38
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-39214'
  - url: 'https://github.com/mitmproxy/mitmproxy'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/mitmproxy/PYSEC-2021-328.yaml
tags:
  - osv
  - pip
epss: 0.01055
epssPercentile: 0.62948
ingestedAt: '2026-07-08T18:25:44.116Z'
---

## Overview

### Impact

In mitmproxy 7.0.2 and below, a malicious client or server is able to perform [HTTP request smuggling](https://en.wikipedia.org/wiki/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.

## Affected packages

- `mitmproxy < 7.0.3`

## Remediation

Upgrade to a patched release:

- `mitmproxy 7.0.3`
