
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-33916 is a prototype pollution-to-XSS vulnerability in the Handlebars.js template engine, formally titled "Prototype Pollution Leading to XSS via Partial Template Injection." It affects Handlebars npm package versions 4.0.0 through 4.7.8 and was disclosed on March 26, 2026, with a patch released the same day. The vulnerability carries a CVSS v3.1 base score of 4.7 (Medium) (GitHub Advisory, Handlebars Advisory).
The root cause lies in resolvePartial() and invokePartial() within lib/handlebars/runtime.js, which resolve partial template names via a plain bracket property lookup (options.partials[options.name]) without calling hasOwnProperty to guard against prototype-chain traversal (CWE-1321). If Object.prototype has been polluted — for example via vulnerable libraries like qs or minimist — with a string value whose key matches a partial reference in a Handlebars template (e.g., widget), the polluted string is returned as the partial body and rendered without HTML escaping, resulting in reflected or stored XSS (CWE-79). Notably, the runtime emits a prototype-access warning but still resolves and renders the polluted value, contradicting the documented security model. The fix in commit 68d8df5 replaces all vulnerable bracket lookups with a lookupOwnProperty() helper that enforces Object.prototype.hasOwnProperty.call() (Handlebars Advisory, Fix Commit).
Successful exploitation enables an attacker to inject arbitrary HTML and JavaScript into pages rendered by Handlebars templates, resulting in reflected or stored XSS. This can lead to session token theft, credential harvesting, account takeover, or unauthorized actions performed on behalf of authenticated users. Confidentiality and integrity are both impacted at a low level per CVSS, with no direct availability impact; however, the scope is changed, meaning the XSS can affect browser contexts beyond the vulnerable component itself (GitHub Advisory).
No confirmed in-the-wild exploitation has been observed, and no weaponized exploit code is publicly available beyond the proof-of-concept included in the security advisory itself. The EPSS score is approximately 0.029% (22nd percentile), indicating a low near-term exploitation probability. Exploitation requires two preconditions: the target application must already be vulnerable to prototype pollution via another vector (e.g., qs, minimist, or a JSON merge sink), and the attacker must know or guess the name of a partial reference used in a template. The vulnerability is not listed in the CISA KEV catalog (GitHub Advisory, Handlebars Advisory).
Object.prototype — common sources include qs.parse(), minimist, or unsafe deep-merge operations on user-controlled JSON.{{> widget}}).Object.prototype: Craft a malicious request that causes the application to execute something equivalent to Object.prototype['widget'] = '<script>alert(document.cookie)</script>', seeding the prototype with an XSS payload keyed to the known partial name.{{> widget}}).resolvePartial() function traverses the prototype chain, retrieves the polluted string as the partial body, and renders it unescaped into the HTML output. The victim's browser executes the injected script, enabling session theft or other malicious actions (Handlebars Advisory).__proto__, constructor, or prototype alongside values resembling HTML/JavaScript payloads; Handlebars runtime warnings about "prototype access" in application logs.?__proto__[widget]=<script>...) targeting endpoints that render Handlebars templates.<script> tags or event handler attributes in template partial slots.<script> blocks or inline event handlers in template output directories.Upgrade the handlebars npm package to version 4.7.9 or later, which replaces all vulnerable prototype-traversing lookups with hasOwnProperty-guarded access (v4.7.9 Release). If immediate upgrade is not possible, two workarounds are available: (1) apply Object.freeze(Object.prototype) early in application startup to prevent prototype pollution entirely — note this may break other libraries; or (2) use the Handlebars runtime-only build (handlebars/runtime), which does not compile templates and reduces the attack surface. IBM has also released patches for affected products including App Connect Enterprise, Business Automation Manager Open Editions, API Connect, CloudPak for AIOps, QRadar Suite Software, and others (IBM App Connect, IBM Business Automation).
The vulnerability was reported by researcher ByamB4 and published by maintainer jaylinski on March 26, 2026, with a same-day patch release. IBM issued multiple security bulletins for downstream products incorporating the vulnerable Handlebars library, including App Connect Enterprise, API Connect, QRadar Suite Software, and CloudPak for AIOps, indicating broad enterprise impact awareness (IBM App Connect, IBM CloudPak AIOps). The vulnerability was picked up by vulnerability tracking platforms including VulnDB and CVEFeed shortly after disclosure, and detection signatures were added by Nessus and Qualys scanners.
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."