GHSA-vpq5-4rc8-c222: Canvas Denial of Service Vulnerability

MODERATE
Published
Advisory Summary

GHSA-vpq5-4rc8-c222 is a MODERATE denial of service vulnerability (General Security Weakness) affecting Canvas libraries in the npm ecosystem. The issue involves denial of service in canvas. Remediation is available by upgrading affected packages to version 1.6.10.

GHSA-vpq5-4rc8-c222 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-vpq5-4rc8-c222
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Canvas
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-vpq5-4rc8-c222

To remediate this vulnerability, upgrade all affected Canvas dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

canvas fixed: 1.6.10
npm install canvas@1.6.10
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 canvas

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-vpq5-4rc8-c222, inspect your project dependencies using npm:

npm ls canvas

Analyze the terminal output to locate any version of Canvas in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.10), your application is affected.

Note: The npm ls canvas 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 General Security Weakness. In Canvas, 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 `canvas` prior to 1.6.10 are vulnerable to Denial of Service. Processing malicious JPEGs or GIFs could crash the node process. ## Recommendation Upgrade to version 1.6.10

GHSA-vpq5-4rc8-c222 Affected Canvas Versions

1 component(s)
Fixed Versions:
1.6.10
Product / Package Ecosystem Affected Versions Fixed Version
canvas
npm
< 1.6.10
1.6.10

References

Frequently Asked Questions

What is GHSA-vpq5-4rc8-c222?
GHSA-vpq5-4rc8-c222 is a security vulnerability in Canvas involving Denial of Service in canvas under General Security Weakness.
Which Canvas versions are affected?
Affected versions include releases prior to 1.6.10 across affected packages: canvas.
What version fixes GHSA-vpq5-4rc8-c222?
Upgrading to 1.6.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is canvas affected?
Yes, canvas is affected in releases prior to 1.6.10. Upgrade your dependency to 1.6.10 or later.
What CWE is associated with GHSA-vpq5-4rc8-c222?
GHSA-vpq5-4rc8-c222 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-vpq5-4rc8-c222?
Run the dependency tree command: 'npm ls canvas'. 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-vpq5-4rc8-c222",
  "modified" : "2020-08-31T18:36:22Z",
  "published" : "2019-06-05T14:10:45Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in canvas",
  "details" : "Versions of `canvas` prior to 1.6.10 are vulnerable to Denial of Service. Processing malicious JPEGs or GIFs could crash the node process.\n\n\n## Recommendation\n\nUpgrade to version 1.6.10",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "canvas"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Automattic/node-canvas/commit/c3e4ccb1c404da01e83fe5eb3626bf55f7f55957"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/315037"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/804"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-06-05T12:48:28Z",
    "nvd_published_at" : null
  }
}