cve.bz

CVE-2026-33916 handlebarsjs handlebars: Cross-site Scripting

4.7 mediumExploit referenceEPSS 0.3%Fix available

Medium (4.7) in handlebarsjs handlebars. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in handlebars 4.7.9.

On this page
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.

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 21st percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-03-30. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
CWE-1321 Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-33916 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-33916?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-33916?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-33916 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-33916

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-33916](https://cve.bz/cve/badge/CVE-2026-33916.svg)](https://cve.bz/cve/CVE-2026-33916)

HTML:

<a href="https://cve.bz/cve/CVE-2026-33916"><img src="https://cve.bz/cve/badge/CVE-2026-33916.svg" alt="CVE-2026-33916"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
handlebarsjs:handlebarsfrom 4.0.0 before 4.7.9

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-2qvq-rjwj-gvw9npmhandlebars>=4.0.0 <4.7.94.7.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-handlebarsno fix listedDEBIAN-CVE-2026-33916
Debian14node-handlebars3:4.7.9-1DEBIAN-CVE-2026-33916
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 4 morenode-handlebarsno fix listedUBUNTU-CVE-2026-33916

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Moderate: This vulnerability in Handlebars allows for Cross-Site Scripting (XSS) when an application uses Handlebars versions 4.0.0 through 4.7.8 and is susceptible to prototype pollution. An attacker could inject malicious code into web pages, potentially leading to arbitrary code execution in a user's browser or information disclosure. This affects Red Hat products that embed or utilize vulnerable versions of the Handlebars library.

Red Hat's mitigation

To mitigate this issue, apply `Object.freeze(Object.prototype)` early in the application startup to prevent prototype pollution. Alternatively, use the Handlebars runtime-only build (`handlebars/runtime`), which reduces the attack surface by not compiling templates. Be aware that applying `Object.freeze(Object.prototype)` may impact the functionality of other libraries within the application. Applications utilizing Handlebars may require a restart for these changes to take effect.

ProductPackageStateAdvisory
Cryostat 4handlebarsFix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch6-rhel9Fix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-operator-bundleFix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-proxy-rhel9Fix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-rhel9-operatorFix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/kibana6-rhel8Fix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/logging-curator5-rhel9Fix deferred
Red Hat Data Grid 8handlebarsFix deferred
Red Hat Enterprise Linux 10firefoxFix deferred
Red Hat Enterprise Linux 10thunderbirdFix deferred
Red Hat Enterprise Linux 7firefoxFix deferred
Red Hat Enterprise Linux 8389-ds:1.4/389-ds-baseOut of support scope
Red Hat Enterprise Linux 8firefoxFix deferred
Red Hat Enterprise Linux 8grafanaOut of support scope
Red Hat Enterprise Linux 8mozjs60Fix deferred
Red Hat Enterprise Linux 8thunderbirdFix deferred
Red Hat Enterprise Linux 9firefoxFix deferred
Red Hat Enterprise Linux 9thunderbirdFix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9Fix deferred
Red Hat OpenShift Dev Spacesdevspaces/code-rhel9Fix deferred
1 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-33916.

Attack patterns (CAPEC)

  • CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs Likelihood: High · Severity: High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-180 Exploiting Incorrectly Configured Access Control Security Levels Likelihood: High · Severity: Medium
  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON