CVE-2022-24429: Convert svg core Code Injection Vulnerability
HIGHCVE-2022-24429 is a HIGH (CVSS 8.6) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Convert svg core libraries in the npm ecosystem. The issue involves code injection via svg file in convert-svg-core. Remediation is available by upgrading affected packages to version 0.6.3.
CVE-2022-24429 at a Glance
Security Impact
CVSS: 8.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H).
How to Fix CVE-2022-24429
To remediate this vulnerability, upgrade all affected Convert svg core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install convert-svg-core@0.6.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls convert-svg-core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-24429, inspect your project dependencies using npm:
npm ls convert-svg-core
Analyze the terminal output to locate any version of Convert svg core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.3), your application is affected.
Note: The npm ls convert-svg-core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Convert svg core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-24429 Affected Convert svg core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
convert-svg-core
|
npm |
< 0.6.3
|
0.6.3
|
References
Frequently Asked Questions
What is CVE-2022-24429?
Which Convert svg core versions are affected?
What version fixes CVE-2022-24429?
Is convert-svg-core affected?
What is the CVSS score of CVE-2022-24429?
What CWE is associated with CVE-2022-24429?
How can I check npm dependencies for CVE-2022-24429?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-54px-mhwv-5v8x",
"modified" : "2022-06-17T00:55:34Z",
"published" : "2022-06-11T00:00:17Z",
"aliases" : [ "CVE-2022-24429" ],
"summary" : "Code injection via SVG file in convert-svg-core",
"details" : "The package convert-svg-core before 0.6.3 are vulnerable to Arbitrary Code Injection when using a specially crafted SVG file. An attacker can read arbitrary files from the file system and then show the file content as a converted PNG file.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "convert-svg-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24429"
}, {
"type" : "WEB",
"url" : "https://github.com/neocotic/convert-svg/issues/84"
}, {
"type" : "WEB",
"url" : "https://github.com/neocotic/convert-svg/commit/a43dffaab0f1e419d5be84e2e7356b86ffac3cf1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/neocotic/convert-svg"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-CONVERTSVGCORE-2859212"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:55:34Z",
"nvd_published_at" : "2022-06-10T20:15:00Z"
}
}