CVE-2026-33916

Handlebars.js has Prototype Pollution Leading to XSS through Partial Template Injection

MEDIUM
4.7
CVSS Score
Published: March 27, 2026 at 09:00 PM UTC
Updated: June 17, 2026 at 10:38 AM UTC
2 products affected across 2 vendorsHandlebarsHandlebars

Using handlebars.js by handlebars-lang?

Get instant alerts when new vulnerabilities affect handlebars.js - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.7
Exploit prediction
EPSS 0.3%
SSVC
PoC

Description

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, `resolvePartial()` in the Handlebars runtime resolves partial names via a plain property lookup on `options.partials` without guarding against prototype-chain traversal. When `Object.prototype` has been polluted with a string value whose key matches a partial reference in a template, the polluted string is used as the partial body and rendered without HTML escaping, resulting in reflected or stored XSS. Version 4.7.9 fixes the issue. Some workarounds are available. Apply `Object.freeze(Object.prototype)` early in application startup to prevent prototype pollution. Note: this may break other libraries, and/or use the Handlebars runtime-only build (`handlebars/runtime`), which does not compile templates and reduces the attack surface.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.0.0 ≤ v < 4.7.9
v < 4.7.9
Affected range stops below 4.7.9, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.7MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-79CWE-1321

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card