<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-01T21:55:20.108764+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-442j-39wm-28r2</id>
    <title>GHSA-442j-39wm-28r2 — Handlebars.js has a Property Access Validation Bypass in container.lookup</title>
    <updated>2026-10-01T21:55:20.136287+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: handlebars</p>
<p>## Summary</p>
<p>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.</p>
<p>Only relevant when the **compat** compile option is enabled (`{compat: true}`), which activates `depthedLookup` in `lib/handlebars/compiler/javascript-compiler.js`.</p>
<p>## Description</p>
<p>The vulnerable code in `lib/handlebars/runtime.js` (lines 137–144):</p>
<p>```javascript
lookup: function (depths, name) {
  const len = depths.length;
  for (let i = 0; i &lt; len; i++) {
    let result = depths[i] &amp;&amp; container.lookupProperty(depths[i], name);
    if (result != null) {
      return depths[i][name];  // BUG: should be `return result;`
    }
  }
},
```</p>
<p>`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.</p>
<p>## Workarounds</p>
<p>- Avoid enabling `{ compat: true }` when rendering templates that includ…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-442j-39wm-28r2"/>
  </entry>
</feed>
