CVE-2022-35920
Improper Limitation of a Pathname to a Restricted Directory in sanic
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
8.3
Improper Limitation of a Pathname to a Restricted Directory in sanic
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.
- Record
CVE-2022-35920- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2022-6514
8.3
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.
- Record
EUVD-2022-6514- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-8cw9-5hmv-77w6
8.3
sanic vulnerable to Path Traversal when using `app.static` if using encoded `%2F` URLs
Impact
Access to lateral directories when using app.static if using encoded %2F URLs. Parent directory traversal is not impacted.
Patches
- v20.12.7 (LTS)
- v21.12.2 (LTS)
- v22.6.1
References
https://github.com/sanic-org/sanic/issues/2478 https://github.com/sanic-org/sanic/pull/2495
For more information
If you have any questions or comments about this advisory:
- Open an issue in the community forums
- Ping us on the Discord server
- Record
GHSA-8cw9-5hmv-77w6- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
8.3
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.
- Record
CVE-2022-35920- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
8.3
Improper Limitation of a Pathname to a Restricted Directory in sanic
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.
- Record
CVE-2022-35920- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-8cw9-5hmv-77w6
8.3
sanic vulnerable to Path Traversal when using `app.static` if using encoded `%2F` URLs
Impact
Access to lateral directories when using app.static if using encoded %2F URLs. Parent directory traversal is not impacted.
Patches
- v20.12.7 (LTS)
- v21.12.2 (LTS)
- v22.6.1
References
https://github.com/sanic-org/sanic/issues/2478 https://github.com/sanic-org/sanic/pull/2495
For more information
If you have any questions or comments about this advisory:
- Open an issue in the community forums
- Ping us on the Discord server
- Record
GHSA-8cw9-5hmv-77w6- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVPYSEC-2026-918
8.3
sanic vulnerable to Path Traversal when using `app.static` if using encoded `%2F` URLs
Impact
Access to lateral directories when using app.static if using encoded %2F URLs. Parent directory traversal is not impacted.
Patches
- v20.12.7 (LTS)
- v21.12.2 (LTS)
- v22.6.1
References
https://github.com/sanic-org/sanic/issues/2478 https://github.com/sanic-org/sanic/pull/2495
For more information
If you have any questions or comments about this advisory:
- Open an issue in the community forums
- Ping us on the Discord server
- Record
PYSEC-2026-918- CVSS 3.1
- 8.3 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
sanicPyPI |
22.0.0 up to 22.6.1 | 22.6.1 |
sanicPyPI |
21.0.0 up to 21.12.2 | 21.12.2 |
sanicPyPI |
before 20.12.7 | 20.12.7 |
sanicPyPI |
22.0.0 up to 22.6.1, plus listed versions 22.3.022.3.122.3.222.6.0 |
22.6.1 |
sanicPyPI |
21.0.0 up to 21.12.2, plus listed versions 21.12.021.12.121.3.021.3.121.3.2 Show 8 moreShow less21.3.421.6.021.6.121.6.221.9.021.9.121.9.221.9.3 |
21.12.2 |
sanicPyPI |
before 20.12.7, plus listed versions 0.1.00.1.10.1.30.1.40.1.5 Show 44 moreShow less0.1.60.1.70.1.80.1.90.2.00.3.00.3.10.4.00.4.10.5.00.5.10.5.20.5.40.6.00.7.00.8.00.8.10.8.20.8.318.12.019.12.019.12.219.12.319.12.419.12.519.3.119.6.019.6.219.6.319.9.020.12.020.12.120.12.220.12.320.12.420.12.520.12.620.3.020.6.020.6.120.6.220.6.320.9.020.9.1 |
20.12.7 |
sanicPyPI |
before 20.12.7, 22.0.0 up to 22.6.1, 21.0.0 up to 21.12.2, plus listed versions 0.1.00.1.10.1.30.1.40.1.5 Show 45 moreShow less0.1.60.1.70.1.80.1.90.2.00.3.00.3.10.4.00.4.10.5.00.5.10.5.20.5.40.6.00.7.00.8.00.8.10.8.20.8.318.12.019.12.019.12.219.12.319.12.419.12.519.3.119.6.019.6.219.6.319.9.020.12.020.12.120.12.220.12.320.12.420.12.520.12.620.3.020.6.020.6.120.6.220.6.320.9.020.9.121.12.0 |
20.12.722.6.121.12.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-35920 is a high vulnerability (CVSS 8.3) in Sanic-org Sanic, published August 1, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.20%, the 68th percentile. Fixed in sanic 22.6.1.
References
github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6
github.com/sanic-org/sanic/issues/2478
github.com/sanic-org/sanic/pull/2495
nvd.nist.gov/vuln/detail/CVE-2022-35920
github.com/advisories/GHSA-8cw9-5hmv-77w6
github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35920.json
github.com/sanic-org/sanic
pypi.org/project/sanic
Left out here: 16 versions. The JSON record has them.