CVE-2020-7694 Details
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).
A log injection vulnerability has been identified in all versions of the Uvicorn package. This issue arises from the request logger, which is susceptible to ANSI escape sequence injection. By sending crafted URLs with percent-encoded escape sequences, attackers can manipulate the logged output. Uvicorn logs HTTP request details to the console or a log file, processing the URLs with urllib.parse.unquote. This conversion can unintentionally introduce special characters that terminals interpret in specific ways. Exploitation of this vulnerability can lead to two main consequences: corrupting Uvicorn's access logs and using ANSI codes to interact with the terminal emulator displaying the logs, either live or from a file.
Upgrade Uvicorn to version 0.11.7 or higher.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/encode/uvicorn | CVE | ProductThird Party Advisory |
| https://snyk.io/vuln/SNYK-PYTHON-UVICORN-575560 | CVE | ExploitThird Party Advisory |
| https://github.com/encode/uvicorn | [email protected] | ProductThird Party Advisory |
| https://snyk.io/vuln/SNYK-PYTHON-UVICORN-575560 | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-116 | Improper Encoding or Escaping of Output | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| encode uvicorn | All versions |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Jul 21, 2021 | CWE Remap | [email protected] |
| Aug 4, 2020 | Initial Analysis | [email protected] |