CVE-2021-23631: Path Traversal in convert-svg packages
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.57912%
CWE
Published
1/27/2022
Updated
2/3/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
convert-svg-core | npm | <= 0.5.0 | |
convert-svg-to-png | npm | <= 0.5.0 | |
convert-svg-to-jpeg | npm | <= 0.5.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how SVG files are processed during conversion. The PoC demonstrates that the convert()
function (used by all three packages) renders SVG content containing file:// URI schemes in iframe elements. This indicates the conversion function fails to: 1. validate()
/sanitize external resource references 2. Restrict filesystem access when rendering embedded content 3. Properly sandbox the rendering environment. As all affected packages share the core conversion logic, the vulnerability likely resides in the fundamental SVG processing implementation within convert-svg-core
.