GHSA-9hqj-38j2-5jgm: Ascii art Command Injection Vulnerability
LOWGHSA-9hqj-38j2-5jgm is a LOW command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Ascii art libraries in the npm ecosystem. The issue involves command injection in ascii-art. Remediation is available by upgrading affected packages to version 1.4.4.
GHSA-9hqj-38j2-5jgm at a Glance
How to Fix GHSA-9hqj-38j2-5jgm
To remediate this vulnerability, upgrade all affected Ascii art 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 ascii-art@1.4.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ascii-art
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-9hqj-38j2-5jgm, inspect your project dependencies using npm:
npm ls ascii-art
Analyze the terminal output to locate any version of Ascii art in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.4), your application is affected.
Note: The npm ls ascii-art 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 Ascii art, 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
GHSA-9hqj-38j2-5jgm Affected Ascii art Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ascii-art
|
npm |
< 1.4.4
|
1.4.4
|
References
Frequently Asked Questions
What is GHSA-9hqj-38j2-5jgm?
Which Ascii art versions are affected?
What version fixes GHSA-9hqj-38j2-5jgm?
Is ascii-art affected?
What CWE is associated with GHSA-9hqj-38j2-5jgm?
How can I check npm dependencies for GHSA-9hqj-38j2-5jgm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9hqj-38j2-5jgm",
"modified" : "2020-08-31T18:33:35Z",
"published" : "2020-09-01T21:19:23Z",
"aliases" : [ ],
"summary" : "Command Injection in ascii-art",
"details" : "Versions of `ascii-art` before 1.4.4 are vulnerable to command injection. This is exploitable when user input is passed into the argument of the `ascii-art preview` command. \n\n\nExample Proof of concept:\n`ascii-art preview 'doom\"; touch /tmp/malicious; echo \"'`\n\nGiven that the input is passed on the command line and none of the api methods are vulnerable to this, the likely exploitation vector is when the ascii-art comment is being called programmatically using something like `execFile`.\n\n\n## Recommendation\n\nUpdate to version 1.4.4 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ascii-art"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.4.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://hackerone.com/reports/390631"
}, {
"type" : "WEB",
"url" : "https://github.com/nodejs/security-wg/blob/master/vuln/npm/471.json"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/727"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:33:35Z",
"nvd_published_at" : null
}
}