GHSA-7RX3-28CR-V5WH

GHSA-7RX3-28CR-V5WH is a medium-severity security vulnerability in handlebars (npm), affecting versions >= 4.6.0, <= 4.7.8. It is fixed in 4.7.9.

Summary

The prototype method blocklist in lib/handlebars/internal/proto-access.js blocks constructor, __defineGetter__, __defineSetter__, and __lookupGetter__, but omits the symmetric __lookupSetter__. This omission is only exploitable when the non-default runtime option allowProtoMethodsByDefault: true is explicitly set, in that configuration __lookupSetter__ becomes accessible while its counterparts remain blocked, creating an inconsistent security boundary.

4.6.0 is the version that introduced protoAccessControl and the allowProtoMethodsByDefault runtime option.

Description

In lib/handlebars/internal/proto-access.js:

const methodWhiteList = Object.create(null);
methodWhiteList['constructor']      = false;
methodWhiteList['__defineGetter__'] = false;
methodWhiteList['__defineSetter__'] = false;
methodWhiteList['__lookupGetter__'] = false;
// __lookupSetter__ intentionally blocked in CVE-2021-23383,
// but omitted here, creating an asymmetric blocklist

All four legacy accessor helpers (__defineGetter__, __defineSetter__, __lookupGetter__, __lookupSetter__) were involved in the exploit chain addressed by CVE-2021-23383. Three of the four were explicitly blocked; __lookupSetter__ was left out.

When allowProtoMethodsByDefault: true is set, any prototype method not present in methodWhiteList is permitted by default. Because __lookupSetter__ is absent from the list, it passes the checkWhiteList check and is accessible in templates, while __lookupGetter__ (its sibling) is correctly denied.

Workarounds

  • Do not set allowProtoMethodsByDefault: true. The default configuration is not affected.
  • If allowProtoMethodsByDefault must be enabled, ensure templates do not reference __lookupSetter__ through untrusted input.

Impact

GHSA-7RX3-28CR-V5WH has a CVSS score of 4.8 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.7.9); upgrading removes the vulnerable code path.

Affected versions

handlebars (>= 4.6.0, <= 4.7.8)

Security releases

handlebars → 4.7.9 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade handlebars to 4.7.9 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-7RX3-28CR-V5WH? GHSA-7RX3-28CR-V5WH is a medium-severity security vulnerability in handlebars (npm), affecting versions >= 4.6.0, <= 4.7.8. It is fixed in 4.7.9.
  2. How severe is GHSA-7RX3-28CR-V5WH? GHSA-7RX3-28CR-V5WH has a CVSS score of 4.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of handlebars are affected by GHSA-7RX3-28CR-V5WH? handlebars (npm) versions >= 4.6.0, <= 4.7.8 is affected.
  4. Is there a fix for GHSA-7RX3-28CR-V5WH? Yes. GHSA-7RX3-28CR-V5WH is fixed in 4.7.9. Upgrade to this version or later.
  5. Is GHSA-7RX3-28CR-V5WH exploitable, and should I be worried? Whether GHSA-7RX3-28CR-V5WH is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-7RX3-28CR-V5WH is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-7RX3-28CR-V5WH? Upgrade handlebars to 4.7.9 or later.

Other vulnerabilities in handlebars

CVE-2026-33940CVE-2026-33939CVE-2026-33938CVE-2026-33937CVE-2026-33916

Stop the waste.
Protect your environment with Kodem.