CVE-2022-21165: Font converter Font-Converter Vulnerable To Arbitrary Command Vulnerability
CRITICALCVE-2022-21165 is a CRITICAL (CVSS 9.8) font-converter vulnerable to arbitrary command vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Font converter libraries in the npm ecosystem. The issue involves font-converter vulnerable to arbitrary command injection. Remediation is available in the latest vendor maintenance releases.
CVE-2022-21165 at a Glance
Security Impact
CVSS: 9.8
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:H/I:H/A:H).
How to Fix CVE-2022-21165
To remediate this vulnerability, upgrade all affected Font converter 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 font-converter@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls font-converter
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-21165, inspect your project dependencies using npm:
npm ls font-converter
Analyze the terminal output to locate any version of Font converter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls font-converter 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-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Font converter, 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-21165 Affected Font converter Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
font-converter
|
npm |
≤ 1.1.1
|
|
References
Frequently Asked Questions
What is CVE-2022-21165?
Which Font converter versions are affected?
What version fixes CVE-2022-21165?
Is font-converter affected?
What is the CVSS score of CVE-2022-21165?
What CWE is associated with CVE-2022-21165?
How can I check npm dependencies for CVE-2022-21165?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g2c3-vwff-m3xr",
"modified" : "2024-04-22T23:17:12Z",
"published" : "2022-08-29T20:06:54Z",
"aliases" : [ "CVE-2022-21165" ],
"summary" : "Font-Converter Vulnerable to Arbitrary Command Injection",
"details" : "### Overview\nfont-converter is a FontForge wrapper that allows conversion between different font formats (TTF, WOFF, OTF)\n\nAll versions of this package are vulnerable to Arbitrary Command Injection due to missing sanitization of input that potentially flows into the `child_process.exec()` function.\n\n### PoC\n```js\nvar PUT = require('font-converter');\nvar x = \"$(touch success);# \";\ntry {\n new PUT(x, x, x, x);\n} catch (e) {\n console.log(e);\n}\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "font-converter"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-21165"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/zgec/node-js-font-converter"
}, {
"type" : "WEB",
"url" : "https://github.com/zgec/node-js-font-converter/blob/master/index.js#L12"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-FONTCONVERTER-2976194"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-22T23:17:12Z",
"nvd_published_at" : "2022-08-29T05:15:00Z"
}
}