GHSA-vpq5-4rc8-c222: Canvas Denial of Service Vulnerability
MODERATEGHSA-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
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.
npm install canvas@1.6.10
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
GHSA-vpq5-4rc8-c222 Affected Canvas Versions
1 component(s)| 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?
Which Canvas versions are affected?
What version fixes GHSA-vpq5-4rc8-c222?
Is canvas affected?
What CWE is associated with GHSA-vpq5-4rc8-c222?
How can I check npm dependencies for GHSA-vpq5-4rc8-c222?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}