Impact
The vulnerability occurs when a Handlebars template contains decorator syntax that references an unregistered decorator, causing an undefined value to be invoked as a function during compilation. This triggers an unhandled TypeError, crashing the Node.js process and resulting in a denial of service. The weakness involves unexpected type usage and lack of exception handling, corresponding to common error handling failures.
Affected Systems
Handlbars.js versions 4.0.0 through 4.7.8 from the handlebars-lang project are affected. Any Node.js application that compiles user-supplied templates using these versions without proper safeguards is at risk. The flaw was remedied in version 4.7.9.
Risk and Exploitability
Based on the CVSS score of 7.5, the flaw carries high severity, while the EPSS score of less than 1% suggests a low probability of real‑world exploitation. It is not listed in the CISA KEV catalog. Nonetheless, if an application compiles templates on request from untrusted input, an attacker can trigger the crash by sending a template containing malformed decorator syntax such as '{{*n}}', thereby causing repeated service interruptions. The lack of defensive coding and the potential to crash the entire process amplifies the impact of the vulnerability.
OpenCVE Enrichment
Github GHSA