CVE-2021-23631 Directory Traversal
Attackers can read arbitrary files from the file system by providing a specially crafted SVG file to the conversion library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-23631?
CVE-2021-23631 is a high-severity path traversal vulnerability in convert-svg-core, published on 21 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This affects all versions of package convert-svg-core; all versions of package convert-svg-to-png; all versions of package convert-svg-to-jpeg. Using a specially crafted SVG file, an attacker could read arbitrary files from the file system and then show the file content as a converted PNG file.
Weakness: CWE-22
Which versions are affected by CVE-2021-23631?
6 open source packages ship an affected version, including convert-svg-core, convert-svg-to-jpeg and convert-svg-to-png. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
convert-svg-core npm | All versions to 0.5.0 | None |
convert-svg-core npm | All versions to 0.5.0 | None |
convert-svg-to-jpeg npm | All versions to 0.5.0 | None |
convert-svg-to-jpeg npm | All versions to 0.5.0 | None |
convert-svg-to-png npm | All versions to 0.5.0 | None |
convert-svg-to-png npm | All versions to 0.5.0 | None |
Products include Convert-Svg-Core Project Convert-Svg-Core.
How do I fix CVE-2021-23631?
No fix has been published for CVE-2021-23631 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-23631 being exploited?
There is no known exploitation of CVE-2021-23631 in the wild and no public exploit code.
Other vulnerabilities in convert-svg-core
Sources
Also known as GHSA-jv7g-9g6q-cxvw.