Vulnerability · Published Jul 27, 2020 · Assigned by snyk

CVE-2020-7694Log Injection

Low 3.7

In plain English

A low-severity security flaw in uvicorn. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 72% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)3.7Low
Exploit odds (30 days)1.4%top 28.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-uvicorn0.13.3-1DEBIAN-CVE-2020-7694
Debian:13python-uvicorn0.13.3-1DEBIAN-CVE-2020-7694
Debian:14python-uvicorn0.13.3-1DEBIAN-CVE-2020-7694
PyPIuvicorn0.11.7GHSA-33c7-2mpw-hg34
PyPIuvicorn0.11.7PYSEC-2020-150
Ubuntu:22.04:LTSpython-uvicornno fix listedUBUNTU-CVE-2020-7694
Ubuntu:24.04:LTSpython-uvicornno fix listedUBUNTU-CVE-2020-7694
Ubuntu:25.10python-uvicornno fix listedUBUNTU-CVE-2020-7694
Ubuntu:26.04:LTSpython-uvicornno fix listedUBUNTU-CVE-2020-7694
Ubuntu:26.10python-uvicornno fix listedUBUNTU-CVE-2020-7694

Affected products (as reported)

VendorProductVersions
n/a uvicorn 0 – before unspecified

References