
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-33938 is a JavaScript injection vulnerability in Handlebars.js, described as "JavaScript Injection via AST Type Confusion by tampering @partial-block." It affects Handlebars npm package versions 4.0.0 through 4.7.8 (inclusive) and was disclosed on March 26, 2026, with a patch released the same day. The vulnerability carries a CVSS v3.1 base score of 8.1 (High) (Github Advisory, GitHub Advisory DB). Multiple IBM enterprise products that bundle Handlebars are also affected, including IBM App Connect Enterprise, IBM Cloud Pak for Integration, IBM API Connect, IBM Business Automation Manager Open Editions, IBM QRadar Suite Software, and others (IBM Advisory).
The root cause is a combination of CWE-94 (Code Injection) and CWE-843 (Type Confusion). Handlebars stores the @partial-block special variable in a mutable template data frame accessible to helpers. Any registered helper that accepts an object reference and writes arbitrary properties to it — such as the merge helper from the popular handlebars-helpers npm package — can overwrite @partial-block with an attacker-controlled Handlebars AST object. When {{> @partial-block}} is subsequently evaluated, invokePartial receives the crafted object; because it is not a compiled function, the runtime falls back to dynamically compiling it via env.compile(). If the injected object is a well-formed Handlebars AST with a PathExpression whose depth field contains a JavaScript string payload (breaking out of the generated function call), arbitrary JavaScript executes in the server process (Github Advisory). The fix in commit 68d8df5 adds validateInputAst() to reject pre-parsed AST objects with non-integer depth values, non-array parts, or non-string part elements, and uses lookupOwnProperty() to prevent prototype-chain traversal when resolving @partial-block (Patch Commit).
Successful exploitation enables arbitrary JavaScript execution on the server running the Handlebars template engine, resulting in full compromise of confidentiality, integrity, and availability. An attacker can read sensitive server-side data, modify application state, or crash the Node.js process. In environments where Handlebars is embedded in larger platforms (e.g., IBM Cloud Pak, API Connect, QRadar), exploitation could serve as a foothold for lateral movement within enterprise infrastructure (Github Advisory, GitHub Advisory DB).
A working proof-of-concept (PoC) is publicly available in the official security advisory, demonstrating self-contained RCE by injecting a malicious Handlebars AST through the @partial-block mechanism (Github Advisory). Exploitation requires no authentication and no user interaction, but does require high attack complexity — specifically, the attacker must be able to influence template context data or leverage a registered helper (such as merge from handlebars-helpers) that writes to the data frame. The EPSS score is approximately 0.048% (15th percentile), and there is no evidence of in-the-wild exploitation or CISA KEV catalog listing as of the time of this report (GitHub Advisory DB). No threat actor attribution has been reported.
merge helper from handlebars-helpers).Program AST node. Within a MustacheStatement, set the PathExpression.depth field to a string containing a JavaScript payload that breaks out of the generated function call, e.g.:depth: "0])),function () { require('child_process').exec('id', console.log); }()));//"payload in maliciousContext).@partial-block mutation: Use a template that calls the merge helper to overwrite @_parent.partial-block with the crafted AST object:{{#*inline "myPartial"}}
{{> @partial-block}}
{{/inline}}
{{#> myPartial}}
{{merge @_parent partial-block=1}}
{{merge @_parent partial-block=payload}}
{{/myPartial}}{{> @partial-block}} is evaluated, invokePartial receives the crafted AST object. The runtime, finding it is not a compiled function, calls env.compile() on it. The injected depth string breaks out of the generated JavaScript function, executing the attacker's payload in the server process (Github Advisory).console.error or console.log containing strings like VULNERABLE: RCE via @partial-block; unhandled exceptions or stack traces originating from env.compile() or invokePartial with non-function arguments.sh, bash, cmd.exe, curl, wget, python) that are not part of normal application behavior./tmp created by the Node.js process owner; presence of web shells or reverse shell scripts dropped by the server process.type: "Program" keys, which may indicate attempted AST injection.The primary remediation is to upgrade Handlebars to version 4.7.9, which validates pre-parsed AST inputs and uses lookupOwnProperty() to prevent @partial-block mutation (v4.7.9 Release, Patch Commit). If immediate upgrade is not possible, three workarounds are available: (1) use the runtime-only build (require('handlebars/runtime')), which lacks the compile() method and eliminates the vulnerable fallback path; (2) audit all registered helpers to ensure they treat context data as read-only and do not write arbitrary values to context objects; (3) avoid registering helpers from third-party packages such as handlebars-helpers in contexts where templates or context data can be influenced by untrusted input (Github Advisory). IBM has issued separate advisories for affected products including App Connect Enterprise, Cloud Pak for Integration, API Connect, Business Automation Manager Open Editions, QRadar Suite Software, and others, and customers should apply the relevant IBM iFixes (IBM Advisory).
IBM issued multiple security bulletins in April–June 2026 addressing CVE-2026-33938 across a broad range of enterprise products, indicating significant downstream impact of this supply-chain vulnerability (IBM Advisory). The vulnerability was noted on Bluesky by CVE tracking accounts shortly after disclosure, and security aggregators such as VulnDB and CVEFeed indexed it rapidly. No major independent researcher write-ups or significant social media controversy have been identified beyond standard advisory dissemination.
Fix availability across major Linux distributions and their releases.
bookworm
node-handlebars
sid
node-handlebars: 3:4.7.9-1
trixie
node-handlebars
bionic (esm-apps)
node-handlebars
devel
node-handlebars
focal (esm-apps)
node-handlebars
jammy
node-handlebars
jammy (esm-apps)
node-handlebars
noble
node-handlebars
noble (esm-apps)
node-handlebars
resolute
node-handlebars
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."