CVE-2022-31507 Ganga allows absolute path traversal
An attacker can read arbitrary files on the server due to unsafe use of Flask send_file in the Ganga library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-31507?
CVE-2022-31507 is a critical path traversal vulnerability in n/a, published on 11 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The ganga-devs/ganga repository before 8.5.10 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
Weakness: CWE-22
Which versions are affected by CVE-2022-31507?
3 open source packages ship an affected version, including ganga. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
ganga PyPI | All versions | 8.5.10 |
ganga PyPI | All versions | 8.5.10 |
ganga PyPI | All versions | 8.5.10 |
Products include Ganga Project Ganga.
How do I fix CVE-2022-31507?
Upgrade ganga to 8.5.10 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2022-31507 being exploited?
There is no known exploitation of CVE-2022-31507 in the wild and no public exploit code.
Sources
Also known as GHSA-7488-6x3r-23w5, PYSEC-2022-225.