# CVE-2022-35920: sanic Path Traversal — Fixed in 22.6.1

🐍

🐍 PyPI

Not in CISA KEV

HIGH severity

# CVE-2022-35920 — sanic

HIGH [Fix: sanic-org/sanic#2495](https://github.com/sanic-org/sanic/pull/2495)

CVE-2022-35920 is a high-severity (CVSS 8.3) Path Traversal vulnerability in sanic. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for sanic — see the affected versions and patch details below.

Improper Limitation of a Pathname to a Restricted Directory in sanic

Also known as[GHSA-8cw9-5hmv-77w6](/vulnerability/GHSA-8cw9-5hmv-77w6)PYSEC-2026-918

Published

Aug 1, 2022

Updated

Oct 28, 2026

Affected

3 pkgs

Patched

3 / 3

Exploits

1 known

Exploitation data as of Nov 5, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## Exploitation Status

### Proof-of-concept exploit code exists

-   CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
-   CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2022-35920.

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

1.2%probability of exploitation in next 30 days

Lower Risk0.00%

Lower risk than most CVEs68th percentile — riskier than 68% of all scored CVEsHighest risk

0.25%0.73%1.22%1.70%0.8%1.2%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

3 pkgs affected

🐍`sanic`🐍`sanic`🐍`sanic`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

## Description

#### 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/issues/2478) [https://github.com/sanic-org/sanic/pull/2495](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](https://community.sanicframework.org/)
-   Ping us on [the Discord server](https://discord.gg/FARQzAEMAA)

## Affected Packages

3 total 3 fixed

Ecosystem

Package

Vulnerable range

Fix

🐍PyPI

`sanic` 

≥ 22.0.0&&< 22.6.1

22.6.1`pip install --upgrade 'sanic==22.6.1'`

🐍PyPI

`sanic` 

≥ 21.0.0&&< 21.12.2

21.12.2`pip install --upgrade 'sanic==21.12.2'`

🐍PyPI

`sanic` 

all versions

20.12.7`pip install --upgrade 'sanic==20.12.7'`

## Affected Products

1 product · 3 configurations

Application

`sanic`sanic\_project

≥ 22.0.0 && < 22.6.1

range

Exploits & PoCs

1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

[

Sanic is an opensource python web server/framework. Affected versions of…

github.comNVDAug 2022

](https://github.com/sanic-org/sanic/issues/2478)

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sanic, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update sanic to 22.6.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-35920 is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
    

## Frequently Asked Questions

\### 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\](https://community.sanicframework.org/) \* Ping us on \[the Discord server\](https://discord.gg/FARQzAEMAA)

O3 Security · Impact-Aware SCA

### Is CVE-2022-35920 in your dependencies?

Find it across PyPI, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)