<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Wed, 30 Sep 2026 18:59:00 +0000</lastBuildDate>
    <item>
      <title>GHSA-3mfm-83xf-c92r — Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block</title>
      <link>https://db.gcve.eu/vuln/ghsa-3mfm-83xf-c92r</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: handlebars&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;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 `{{&amp;gt; @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server.&lt;/p&gt;
&lt;p&gt;## Description&lt;/p&gt;
&lt;p&gt;Handlebars stores `@partial-block` in the `data` frame that is accessible to templates. In nested contexts, a parent frame&amp;#39;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.&lt;/p&gt;
&lt;p&gt;When `{{&amp;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.&lt;/p&gt;
&lt;p&gt;The `handlebars-helpers` npm package (commonly used with Handlebars) includes several helpers such as `merge` that can be used as the mutation primitive.&lt;/p&gt;
&lt;p&gt;## Proof of Concept&lt;/p&gt;
&lt;p&gt;Tested with Handlebars 4.7.8 and `handlebars-helpers`:&lt;/p&gt;
&lt;p&gt;```javascript
const Handlebars = require(&amp;#39;handlebars&amp;#39;);
const merge = require(&amp;#39;handlebars-helpers&amp;#39;).object().merge;
H…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: handlebars&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;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 `{{&amp;gt; @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server.&lt;/p&gt;
&lt;p&gt;## Description&lt;/p&gt;
&lt;p&gt;Handlebars stores `@partial-block` in the `data` frame that is accessible to templates. In nested contexts, a parent frame&amp;#39;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.&lt;/p&gt;
&lt;p&gt;When `{{&amp;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.&lt;/p&gt;
&lt;p&gt;The `handlebars-helpers` npm package (commonly used with Handlebars) includes several helpers such as `merge` that can be used as the mutation primitive.&lt;/p&gt;
&lt;p&gt;## Proof of Concept&lt;/p&gt;
&lt;p&gt;Tested with Handlebars 4.7.8 and `handlebars-helpers`:&lt;/p&gt;
&lt;p&gt;```javascript
const Handlebars = require(&amp;#39;handlebars&amp;#39;);
const merge = require(&amp;#39;handlebars-helpers&amp;#39;).object().merge;
H…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-3mfm-83xf-c92r</guid>
    </item>
  </channel>
</rss>
