CVE-2020-7694
Log Injection
Also known as GHSA-33c7-2mpw-hg34, PYSEC-2020-150, SNYK-PYTHON-UVICORN-575560
Mitigation
- Upgrade uvicorn to 0.11.7 or later.
Who should check
- Projects that depend on PyPI package uvicorn (< 0.11.7)
- Anyone running uvicorn < unspecified
Vulnerability facts
- Affected
- uvicorn < 0.11.7
- Fixed in
- 0.11.7
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 3.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P/RL:U/RC:COpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: None
- E: P
- RL: U
- RC: C
- EPSS
- 1.37% chance of exploitation in 30 days (percentile 72, 2026-11-26)
- CWE
- CWE-94, CWE-116
- Modified
Description
This affects all versions of package uvicorn. The request logger provided by the package is vulnerable to ASNI escape sequence injection. Whenever any HTTP request is received, the default behaviour of uvicorn is to log its details to either the console or a log file. When attackers request crafted URLs with percent-encoded escape sequences, the logging component will log the URL after it's been processed with urllib.parse.unquote, therefore converting any percent-encoded characters into their single-character equivalent, which can have special meaning in terminal emulators. By requesting URLs with crafted paths, attackers can: * Pollute uvicorn's access logs, therefore jeopardising the integrity of such files. * Use ANSI sequence codes to attempt to interact with the terminal emulator that's displaying the logs (either in real time or from a file).
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI uvicorn | < 0.11.7 | 0.11.7 | osv |
| uvicorn | < unspecified | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-7694. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-7694.md Affected: uvicorn < 0.11.7 Fixed in: 0.11.7 Steps: 1. Search this machine and project for uvicorn (PyPI), uvicorn: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Exploits and PoCs
FAQ
Is CVE-2020-7694 being exploited?
There is no confirmed exploitation: CVE-2020-7694 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 1.37% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-7694?
Low: CVSS 3.7 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2020-7694?
uvicorn < 0.11.7.
Is there a fix for CVE-2020-7694?
Yes. Fixed in 0.11.7. Upgrade uvicorn to 0.11.7 or later.
How do I check if I'm affected by CVE-2020-7694?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.