Vulnerabilities in pkg:npm/ascii-art

PACKAGE
Advisory Summary

GHSA-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/ascii-art

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/ascii-art. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9hqj-38j2-5jgm - LOW Command Injection in ascii-art

GHSA-9hqj-38j2-5jgm at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9hqj-38j2-5jgm
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Ascii art
Package Ecosystem npm
Published Date
Last Updated

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.

ascii-art fixed: 1.4.4
npm install ascii-art@1.4.4
Verify Direct and Transitive Dependencies

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

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. Example Proof of concept: `ascii-art preview 'doom"; touch /tmp/malicious; echo "'` Given 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`. ## Recommendation Update to version 1.4.4 or later.

GHSA-9hqj-38j2-5jgm Affected Ascii art Versions

1 component(s)
Fixed Versions:
1.4.4
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?
GHSA-9hqj-38j2-5jgm is a security vulnerability in Ascii art involving Command Injection in ascii-art under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Ascii art versions are affected?
Affected versions include releases prior to 1.4.4 across affected packages: ascii-art.
What version fixes GHSA-9hqj-38j2-5jgm?
Upgrading to 1.4.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ascii-art affected?
Yes, ascii-art is affected in releases prior to 1.4.4. Upgrade your dependency to 1.4.4 or later.
What CWE is associated with GHSA-9hqj-38j2-5jgm?
GHSA-9hqj-38j2-5jgm is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (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.).
How can I check npm dependencies for GHSA-9hqj-38j2-5jgm?
Run the dependency tree command: 'npm ls ascii-art'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}