What’s Vulnerable › Vulnerabilities
CVE-2022-35920: Improper Limitation of a Pathname to a Restricted Directory in sanic
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-08-01 · updated 2026-06-17
- Weakness: CWE-22
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 products
- sanic-org sanic: before 20.12.7; from 21.0.0 before 21.12.2; from 22.0.0 before 22.6.1 — fixed in 20.12.7, 21.12.2, 22.6.1
How to fix
Upgrade to a fixed version: sanic-org sanic 20.12.7, 21.12.2, 22.6.1. Check the vendor advisory for mitigations.
References
- https://github.com/sanic-org/sanic/issues/2478
- https://github.com/sanic-org/sanic/pull/2495
- https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6
- https://github.com/sanic-org/sanic/issues/2478
- https://github.com/sanic-org/sanic/pull/2495
- https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6
Get alerted when CVE-2022-35920 or the next vulnerability affects your stack