Live threats

All CVEs / Encode

CVE-2020-7694Encode Uvicorn

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
1.4%
probability of exploitation in 30 days · percentile 72
Auth required
No
Published
Jul 27, 2020
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94, CWE-116
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

What happens

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).

Original NVD text.

What to do

  1. Apply the vendor's security update for Uvicorn.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI uvicorn < 0.11.7 0.11.7 pip install "uvicorn>=0.11.7"
PyPI uvicorn < 0.11.7 0.11.7 pip install "uvicorn>=0.11.7"

Per OSV / GitHub Advisories (GHSA-33c7-2mpw-hg34, PYSEC-2020-150). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
encodeuvicornall

Official sources

References

Links published by the sources. Open them with care.