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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | sanic | 22.6.1 | GHSA-8cw9-5hmv-77w6 |
| PyPI | sanic | 21.12.2 | GHSA-8cw9-5hmv-77w6 |
| PyPI | sanic | 20.12.7 | GHSA-8cw9-5hmv-77w6 |
| PyPI | sanic | 20.12.7, 21.12.2, 22.6.1 | PYSEC-2026-918 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
References
- https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6 x_refsource_CONFIRM
- https://github.com/sanic-org/sanic/issues/2478 x_refsource_MISC
- https://github.com/sanic-org/sanic/pull/2495 x_refsource_MISC