Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. handlebars
  4. ›
  5. CVE-2026-33938

CVE-2026-33938: Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block

March 27, 2026

The @partial-block special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites @partial-block with a crafted Handlebars AST, a subsequent invocation of {{> @partial-block}} compiles and executes that AST, enabling arbitrary JavaScript execution on the server.

References

  • github.com/advisories/GHSA-3mfm-83xf-c92r
  • github.com/handlebars-lang/handlebars.js
  • github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2
  • github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9
  • github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r
  • nvd.nist.gov/vuln/detail/CVE-2026-33938

Code Behaviors & Features

Detect and mitigate CVE-2026-33938 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 4.0.0 before 4.7.9

Fixed versions

  • 4.7.9

Solution

Upgrade to version 4.7.9 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/handlebars/CVE-2026-33938.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:22 +0000.