# CVE-2020-7694: Log Injection

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.7
- **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:C`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.37% (percentile 72, 2026-11-26)
- **CWE:** CWE-94, CWE-116
- **Aliases:** GHSA-33c7-2mpw-hg34, PYSEC-2020-150, SNYK-PYTHON-UVICORN-575560
- **Published:** 2020-07-27T11:25:12.371Z
- **Modified:** 2026-06-17T03:25:16.747Z

## Who should check

- Projects that depend on PyPI package uvicorn (\< 0.11.7)
- Anyone running uvicorn \< unspecified

## 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

- PyPI `uvicorn`: affected \< 0.11.7; fixed 0.11.7 (osv)
- uvicorn: \< unspecified (cvelist)

## Mitigation

- Upgrade uvicorn to 0.11.7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

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

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2020-7694>
- vendor: <https://github.com/advisories/GHSA-33c7-2mpw-hg34>
- patch: <https://github.com/encode/uvicorn/commit/895807f94ea9a8e588605c12076b7d7517cda503>
- exploit: <https://snyk.io/vuln/SNYK-PYTHON-UVICORN-575560>
- other: <https://github.com/encode/uvicorn>
- other: <https://github.com/encode/uvicorn/issues/723>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/uvicorn/PYSEC-2020-150.yaml>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2020-7694>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-33c7-2mpw-hg34> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2020-150> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2020-7694> · JSON: <https://flawdb.com/api/v1/entries/CVE-2020-7694>
