Vulnerability · Published Aug 1, 2022 · Assigned by GitHub_M

CVE-2022-35920Improper Limitation of a Pathname to a Restricted Directory in sanic

High 8.3

In plain English

A high-severity path traversal in sanic from sanic-org. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 68% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.3High
Exploit odds (30 days)1.2%top 31.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Sanic is an opensource python web server/framework. Affected versions of sanic allow access to lateral directories when using `app.static` if using encoded `%2F` URLs. Parent directory traversal is not impacted. Users are advised to upgrade. There is no known workaround for this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIsanic22.6.1GHSA-8cw9-5hmv-77w6
PyPIsanic21.12.2GHSA-8cw9-5hmv-77w6
PyPIsanic20.12.7GHSA-8cw9-5hmv-77w6
PyPIsanic20.12.7, 21.12.2, 22.6.1PYSEC-2026-918

Affected products (as reported)

VendorProductVersions
sanic-org sanic >= 22.0.0, < 22.6.1>= 21.0.0, < 21.12.2< 20.12.7

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L

References