Every CVESearch/Get API key

GHSA-442j-39wm-28r2

Handlebars.js has a Property Access Validation Bypass in container.lookup

Explain with AI
ChatGPTClaudeGoogle AI
Severity
3.7Low
Network attack, no privileges, no user interactionCVSS 3.1, GitHub Advisories
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
Unknown
No source reports an EPSS score yet.
Listed fix
4.7.9 for handlebars (npm)
From GitHub Advisories and OSV8 other affected packages

Overview

Summary

In lib/handlebars/runtime.js, the container.lookup() function uses container.lookupProperty() as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (depths[i][name]). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that lookupProperty may perform.

Only relevant when the compat compile option is enabled ({compat: true}), which activates depthedLookup in lib/handlebars/compiler/javascript-compiler.js.

Description

The vulnerable code in lib/handlebars/runtime.js (lines 137–144):

lookup: function (depths, name) {
  const len = depths.length;
  for (let i = 0; i < len; i++) {
    let result = depths[i] && container.lookupProperty(depths[i], name);
    if (result != null) {
      return depths[i][name];  // BUG: should be `return result;`
    }
  }
},

container.lookupProperty() (lines 119–136) enforces hasOwnProperty checks and resultIsAllowed() prototype-access controls. However, container.lookup() only uses lookupProperty as a boolean gate — if the gate passes (result != null), it then performs an independent, raw depths[i][name] access that circumvents any transformation or wrapped value that lookupProperty may have returned.

Workarounds

  • Avoid enabling { compat: true } when rendering templates that include untrusted data.
  • Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).

CVSS 3.1 vector

Exploitability

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

Impact

Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected

Packages 9

Affected packages
PackageAffectedFixed
handlebars
npm
4.0.0 to 4.7.8
4.7.9
4.0.0 up to 4.7.9
4.7.9
jupyterhub-k8s-singleuser-sample-fips
Docker Hardened Images:Alpine:3.23
4.4.5-r0 and later, plus listed versions
4.4.5-r14.4.5-r24.4.5-r34.4.5-r44.4.5-r5
None listed
jupyterhub-k8s-singleuser-sample-fips
Docker Hardened Images:Alpine:3.24
4.4.5-r0 and later, plus listed versions
4.4.5-r14.4.5-r24.4.5-r34.4.5-r44.4.5-r5
None listed
jupyterhub-k8s-singleuser-sample
Docker Hardened Images:Alpine:3.23
4.4.5-r0 and later, plus listed versions
4.4.5-r14.4.5-r24.4.5-r34.4.5-r44.4.5-r5
None listed
jupyterhub-k8s-singleuser-sample
Docker Hardened Images:Alpine:3.24
4.4.5-r0 and later, plus listed versions
4.4.5-r14.4.5-r24.4.5-r34.4.5-r44.4.5-r5
None listed
datahub-ingestion
Docker Hardened Images:Debian:13
1.5.0.7-0 and later, plus listed versions
1.6.0.1-01.6.0.1-11.6.0.1-21.6.0.1-31.6.0.2-0
Show 34 more versionsShow less
1.6.0.2-11.7.0.10-01.7.0.12-01.7.0.13-01.7.0.14-01.7.0.14-11.7.0.14-21.7.0.16-01.7.0.16-11.7.0.17-01.7.0.17-11.7.0.17-21.7.0.17-31.7.0.18-01.7.0.19-01.7.0.19-11.7.0.19-21.7.0.19-31.7.0.19-41.7.0.19-51.7.0.19-61.7.0.20-101.7.0.20-61.7.0.20-71.7.0.20-81.7.0.20-91.9.0.1-101.9.0.1-111.9.0.1-121.9.0.1-131.9.0.1-141.9.0.2-141.9.0.2-151.9.0.3-15
None listed
jupyterhub-k8s-singleuser-sample-fips
Docker Hardened Images:Debian:13
4.4.5-0 and later, plus listed versions
4.4.5-14.4.5-24.4.5-34.4.5-44.4.5-54.4.5-6
None listed
jupyterhub-k8s-singleuser-sample
Docker Hardened Images:Debian:13
4.4.5-0 and later, plus listed versions
4.4.5-14.4.5-24.4.5-34.4.5-44.4.5-54.4.5-6
None listed
superset
Docker Hardened Images:Debian:13
6.1.0-0 and later, plus listed versions
6.1.0-16.1.0-106.1.0-116.1.0-126.1.0-13
Show 41 more versionsShow less
6.1.0-146.1.0-156.1.0-166.1.0-176.1.0-186.1.0-196.1.0-26.1.0-206.1.0-216.1.0-226.1.0-236.1.0-246.1.0-256.1.0-266.1.0-276.1.0-286.1.0-296.1.0-36.1.0-306.1.0-316.1.0-326.1.0-336.1.0-346.1.0-356.1.0-366.1.0-376.1.0-386.1.0-396.1.0-46.1.0-406.1.0-416.1.0-426.1.0-436.1.0-446.1.0-456.1.0-466.1.0-56.1.0-66.1.0-76.1.0-86.1.0-9
None listed

Only in multi-CVE advisories 1

Each of these advisories covers several CVEs at once, so it doesn’t establish that this one affects the package.

Packages named only by advisories that cover several CVEs
PackageAffectedFixed
handlebars
TuxCare:npm
4.7.7-tuxcare.0 up to 4.7.7-tuxcare.1, plus listed versions
From an advisory covering 8 CVEs
4.7.7
4.7.7-tuxcare.1
4.7.8-tuxcare.0 up to 4.7.8-tuxcare.1, plus listed versions
From an advisory covering 8 CVEs
4.7.8
4.7.8-tuxcare.1
3.0.8-tuxcare.0 up to 3.0.8-tuxcare.1, plus listed versions
From an advisory covering 3 CVEs
3.0.8
3.0.8-tuxcare.1
4.5.3-tuxcare.0 up to 4.5.3-tuxcare.3, plus listed versions
From an advisory covering 7 CVEs
4.5.34.5.3-tuxcare.14.5.3-tuxcare.2
4.5.3-tuxcare.3
4.0.11-tuxcare.0 up to 4.0.11-tuxcare.1, plus listed versions
From an advisory covering 20 CVEs
4.0.11
4.0.11-tuxcare.1

Sources

GitHub Advisories Score usedCVSS 3.13.7

Handlebars.js has a Property Access Validation Bypass in container.lookup

Summary

In lib/handlebars/runtime.js, the container.lookup() function uses container.lookupProperty() as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (depths[i][name]). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that lookupProperty may perform.

Only relevant when the compat compile option is enabled ({compat: true}), which activates depthedLookup in lib/handlebars/compiler/javascript-compiler.js.

Description

The vulnerable code in lib/handlebars/runtime.js (lines 137–144):

lookup: function (depths, name) {
  const len = depths.length;
  for (let i = 0; i < len; i++) {
    let result = depths[i] && container.lookupProperty(depths[i], name);
    if (result != null) {
      return depths[i][name];  // BUG: should be `return result;`
    }
  }
},

container.lookupProperty() (lines 119–136) enforces hasOwnProperty checks and resultIsAllowed() prototype-access controls. However, container.lookup() only uses lookupProperty as a boolean gate — if the gate passes (result != null), it then performs an independent, raw depths[i][name] access that circumvents any transformation or wrapped value that lookupProperty may have returned.

Workarounds

  • Avoid enabling { compat: true } when rendering templates that include untrusted data.
  • Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).
Record
GHSA-442j-39wm-28r2
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-367
Updated
2026-11-02
OSVDHI-fh4s-zoih-tev7-rfyrCVSS 3.13.7

## Summary

Summary

In lib/handlebars/runtime.js, the container.lookup() function uses container.lookupProperty() as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (depths[i][name]). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that lookupProperty may perform.

Only relevant when the compat compile option is enabled ({compat: true}), which activates depthedLookup in lib/handlebars/compiler/javascript-compiler.js.

Description

The vulnerable code in lib/handlebars/runtime.js (lines 137–144):

lookup: function (depths, name) {
  const len = depths.length;
  for (let i = 0; i < len; i++) {
    let result = depths[i] && container.lookupProperty(depths[i], name);
    if (result != null) {
      return depths[i][name];  // BUG: should be `return result;`
    }
  }
},

container.lookupProperty() (lines 119–136) enforces hasOwnProperty checks and resultIsAllowed() prototype-access controls. However, container.lookup() only uses lookupProperty as a boolean gate — if the gate passes (result != null), it then performs an independent, raw depths[i][name] access that circumvents any transformation or wrapped value that lookupProperty may have returned.

Workarounds

  • Avoid enabling { compat: true } when rendering templates that include untrusted data.
  • Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).
Record
DHI-fh4s-zoih-tev7-rfyr
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Updated
2026-12-04
OSVCVSS 3.13.7

Handlebars.js has a Property Access Validation Bypass in container.lookup

Summary

In lib/handlebars/runtime.js, the container.lookup() function uses container.lookupProperty() as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (depths[i][name]). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that lookupProperty may perform.

Only relevant when the compat compile option is enabled ({compat: true}), which activates depthedLookup in lib/handlebars/compiler/javascript-compiler.js.

Description

The vulnerable code in lib/handlebars/runtime.js (lines 137–144):

lookup: function (depths, name) {
  const len = depths.length;
  for (let i = 0; i < len; i++) {
    let result = depths[i] && container.lookupProperty(depths[i], name);
    if (result != null) {
      return depths[i][name];  // BUG: should be `return result;`
    }
  }
},

container.lookupProperty() (lines 119–136) enforces hasOwnProperty checks and resultIsAllowed() prototype-access controls. However, container.lookup() only uses lookupProperty as a boolean gate — if the gate passes (result != null), it then performs an independent, raw depths[i][name] access that circumvents any transformation or wrapped value that lookupProperty may have returned.

Workarounds

  • Avoid enabling { compat: true } when rendering templates that include untrusted data.
  • Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).
Record
GHSA-442j-39wm-28r2
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-367
Updated
2026-11-02
OSVCLSA-2026-1782349135No score

TuxCare security update for handlebars (8 CVEs)

TuxCare rebuilt handlebars to address 8 CVEs. Fixed in 4.7.7-tuxcare.1.

Record
CLSA-2026-1782349135
Updated
2026-11-02
OSVCLSA-2026-1782435546No score

TuxCare security update for handlebars (8 CVEs)

TuxCare rebuilt handlebars to address 8 CVEs. Fixed in 4.7.8-tuxcare.1.

Record
CLSA-2026-1782435546
Updated
2026-11-02
OSVCLSA-2026-1784596337No score

TuxCare security update for handlebars (3 CVEs)

TuxCare rebuilt handlebars to address 3 CVEs. Fixed in 3.0.8-tuxcare.1.

Record
CLSA-2026-1784596337
Updated
2026-11-02
OSVCLSA-2026-1792139237No score

TuxCare security update for handlebars (7 CVEs)

TuxCare rebuilt handlebars to address 7 CVEs. Fixed in 4.5.3-tuxcare.3.

Record
CLSA-2026-1792139237
Updated
2026-11-02
OSVCLSA-2026-1795526363No score

TuxCare security update for handlebars (20 CVEs)

TuxCare rebuilt handlebars to address 20 CVEs. Fixed in 4.0.11-tuxcare.1.

Record
CLSA-2026-1795526363
Updated
2026-12-05

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
First indexedGitHub Advisories, OSV

Upstream dates may differ.

References

MoveEnter Open