What’s Vulnerable › Vulnerabilities
CVE-2019-20922: Regular Expression Denial of Service in Handlebars
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2020-09-30 · updated 2026-06-17
- Weakness: CWE-400
Description
Handlebars before 4.4.5 allows Regular Expression Denial of Service (ReDoS) because of eager matching. The parser may be forced into an endless loop while processing crafted templates. This may allow attackers to exhaust system resources.
Affected products
- handlebars-lang handlebars.js: from 4.0.0 before 4.4.5 — fixed in 4.4.5
- Npm Handlebars: from 4.0.0 before 4.4.5 — fixed in 4.4.5
How to fix
Upgrade to a fixed version: handlebars-lang handlebars.js 4.4.5; Npm Handlebars 4.4.5. Check the vendor advisory for mitigations.
References
- https://github.com/handlebars-lang/handlebars.js/commit/8d5530ee2c3ea9f0aee3fde310b9f36887d00b8b
- https://snyk.io/vuln/SNYK-JS-HANDLEBARS-480388
- https://www.npmjs.com/advisories/1300
- https://github.com/handlebars-lang/handlebars.js/commit/8d5530ee2c3ea9f0aee3fde310b9f36887d00b8b
- https://snyk.io/vuln/SNYK-JS-HANDLEBARS-480388
- https://www.npmjs.com/advisories/1300
Get alerted when CVE-2019-20922 or the next vulnerability affects your stack