GHSA-f52g-6jhx-586p: Handlebars Denial of Service Vulnerability

MODERATE
CWE-400
Published
Advisory Summary

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

CVE Identifier N/A
GHSA Identifier GHSA-f52g-6jhx-586p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Handlebars
Package Ecosystem npm
Published Date
Last Updated

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.

handlebars fixed: 4.4.5
npm install handlebars@4.4.5
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 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

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. ## Recommendation Upgrade to version 4.4.5 or later.

GHSA-f52g-6jhx-586p Affected Handlebars Versions

1 component(s)
Fixed Versions:
4.4.5
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?
GHSA-f52g-6jhx-586p is a security vulnerability in Handlebars involving Denial of Service in handlebars under CWE-400: Uncontrolled Resource Consumption.
Which Handlebars versions are affected?
Affected versions include releases prior to 4.4.5 across affected packages: handlebars.
What version fixes GHSA-f52g-6jhx-586p?
Upgrading to 4.4.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is handlebars affected?
Yes, handlebars is affected in releases prior to 4.4.5. Upgrade your dependency to 4.4.5 or later.
What CWE is associated with GHSA-f52g-6jhx-586p?
GHSA-f52g-6jhx-586p is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-f52g-6jhx-586p?
Run the dependency tree command: 'npm ls handlebars'. 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-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
  }
}