<?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://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-30T18:59:01.172899+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" 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://db.gcve.eu/vuln/ghsa-3mfm-83xf-c92r</id>
    <title>GHSA-3mfm-83xf-c92r — Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block</title>
    <updated>2026-09-30T18:59:01.174179+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>The `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{&gt; @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server.</p>
<p>## Description</p>
<p>Handlebars stores `@partial-block` in the `data` frame that is accessible to templates. In nested contexts, a parent frame's `@partial-block` is reachable as `@_parent.partial-block`. Because the data frame is a mutable object, any registered helper that accepts an object reference and assigns properties to it can overwrite `@partial-block` with an attacker-controlled value.</p>
<p>When `{{&gt; @partial-block}}` is subsequently evaluated, `invokePartial` receives the crafted object. The runtime, finding an object that is not a compiled function, falls back to **dynamically compiling** the value via `env.compile()`. If that value is a well-formed Handlebars AST containing injected code, the injected JavaScript runs in the server process.</p>
<p>The `handlebars-helpers` npm package (commonly used with Handlebars) includes several helpers such as `merge` that can be used as the mutation primitive.</p>
<p>## Proof of Concept</p>
<p>Tested with Handlebars 4.7.8 and `handlebars-helpers`:</p>
<p>```javascript
const Handlebars = require('handlebars');
const merge = require('handlebars-helpers').object().merge;
H…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-3mfm-83xf-c92r"/>
  </entry>
</feed>
