Findings

CVE-2026-33937

Handlebars provides the power necessary to let users build semantic templates.

Published Mar 27, 2026 · updated Sep 4, 2026 · handlebarsjs handlebars

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, accepts a pre-parsed AST object in addition to a template string. The field of a AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. Validate input type before calling ; ensure the argument is always a , never a plain object or JSON-deserialized value. Use the Handlebars runtime-only build ( ) on the server if templates are pre-compiled at build time; will be unavailable.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Mar 27, 2026 · NIST NVD

    Detected

    Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, accepts a pre-parsed AST object in addition to a template string. The field of a AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to can therefore inject and execute arbitrary JavaScript, leading to Remot

  2. Sep 4, 2026 · NIST NVD

    Updated

    Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, accepts a pre-parsed AST object in addition to a template string. The field of a AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to can therefore inject and execute arbitrary JavaScript, leading to Remot

Affected

  • cpe handlebarsjs/handlebarsversion unspecified

Sources

  • CVE.orgVulnerability recordCVE-2026-33937

    Official CVE identifier

    cve.org
  • NIST NVDVulnerability recordCVE-2026-33937

    Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, accepts a pre-parsed AST object in addition to a template string. The field of a AST node is emitted directly into the ge

    nvd.nist.gov

References