Path Traversal in convert-svg packages
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | convert-svg-core | <= 0.5.0 | no fix |
| npm package | convert-svg-to-jpeg | <= 0.5.0 | no fix |
| npm package | convert-svg-to-png | <= 0.5.0 | no fix |
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-23631
- https://gist.github.com/legndery/a248350bb25b8502a03c2f407cedeb14
- https://github.com/neocotic/convert-svg
- https://snyk.io/vuln/SNYK-JS-CONVERTSVGCORE-1582785
- https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOJPEG-2348245
- https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOPNG-2348244
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-22- Platform
- npm
- Package
convert-svg-core, convert-svg-to-jpeg, convert-svg-to-png- Disclosed
- 27.01.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-jv7g-9g6q-cxvw - CC BY 4.0
Vulnerability history: convert-svg-core
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 01.2022 07.2022
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 3
Disclosures per year
- 2022: 4
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Path Traversal in convert-svg packages this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.