GHSA-f52g-6jhx-586p: Handlebars Denial of Service Vulnerability
MODERATEGHSA-f52g-6jhx-586p is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Handlebars libraries in the npm ecosystem. The issue involves denial of service in handlebars. Remediation is available by upgrading affected packages to version 4.4.5.
GHSA-f52g-6jhx-586p at a Glance
How to Fix GHSA-f52g-6jhx-586p
To remediate this vulnerability, upgrade all affected Handlebars 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 handlebars@4.4.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls handlebars
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-f52g-6jhx-586p, inspect your project dependencies using npm:
npm ls handlebars
Analyze the terminal output to locate any version of Handlebars in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.5), your application is affected.
Note: The npm ls handlebars 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Handlebars, 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-f52g-6jhx-586p Affected Handlebars Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
handlebars
|
npm |
≥ 4.0.0
< 4.4.5
|
4.4.5
|
References
Frequently Asked Questions
What is GHSA-f52g-6jhx-586p?
Which Handlebars versions are affected?
What version fixes GHSA-f52g-6jhx-586p?
Is handlebars affected?
What CWE is associated with GHSA-f52g-6jhx-586p?
How can I check npm dependencies for GHSA-f52g-6jhx-586p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f52g-6jhx-586p",
"modified" : "2020-08-31T18:54:21Z",
"published" : "2020-09-03T23:20:12Z",
"aliases" : [ ],
"summary" : "Denial of Service in handlebars",
"details" : "Affected versions of `handlebars` are vulnerable to Denial of Service. The package's parser may be forced into an endless loop while processing specially-crafted templates. This may allow attackers to exhaust system resources leading to Denial of Service.\n\n\n## Recommendation\n\nUpgrade to version 4.4.5 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "handlebars"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1300"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:54:21Z",
"nvd_published_at" : null
}
}