<?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 02:49:44 +0000</lastBuildDate>
    <item>
      <title>GHSA-2w6w-674q-4c4q — Handlebars.js has JavaScript Injection via AST Type Confusion</title>
      <link>https://db.gcve.eu/vuln/ghsa-2w6w-674q-4c4q</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;`Handlebars.compile()` accepts a pre-parsed AST object in addition to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server.&lt;/p&gt;
&lt;p&gt;## Description&lt;/p&gt;
&lt;p&gt;`Handlebars.compile()` accepts either a template string or a pre-parsed AST. When an AST is supplied, the JavaScript code generator in `lib/handlebars/compiler/javascript-compiler.js` emits `NumberLiteral` values verbatim:&lt;/p&gt;
&lt;p&gt;```javascript
// Simplified representation of the vulnerable code path:
// NumberLiteral.value is appended to the generated code without escaping
compiledCode += numberLiteralNode.value;
```&lt;/p&gt;
&lt;p&gt;Because the value is not wrapped in quotes or otherwise sanitized, passing a string such as `{},{})) + process.getBuiltinModule(&amp;#39;child_process&amp;#39;).execFileSync(&amp;#39;id&amp;#39;).toString() //` as the `value` of a `NumberLiteral` causes the generated `eval`-ed code to break out of its intended context and execute arbitrary commands.&lt;/p&gt;
&lt;p&gt;Any endpoint that deserializes user-controlled JSON and passes the result directly to `Handlebars.compile()` is exploitable.&lt;/p&gt;
&lt;p&gt;## Proof of Concept&lt;/p&gt;
&lt;p&gt;Server-side Express application that passes `req.body.text` to `Handlebars.compile()`:&lt;/p&gt;
&lt;p&gt;```Javascript
import express from &amp;#34;express&amp;#34;;
import Handlebars from &amp;#34;handlebars&amp;#34;;&lt;/p&gt;
&lt;p&gt;const app = express();
app.use(expr…&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;`Handlebars.compile()` accepts a pre-parsed AST object in addition to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server.&lt;/p&gt;
&lt;p&gt;## Description&lt;/p&gt;
&lt;p&gt;`Handlebars.compile()` accepts either a template string or a pre-parsed AST. When an AST is supplied, the JavaScript code generator in `lib/handlebars/compiler/javascript-compiler.js` emits `NumberLiteral` values verbatim:&lt;/p&gt;
&lt;p&gt;```javascript
// Simplified representation of the vulnerable code path:
// NumberLiteral.value is appended to the generated code without escaping
compiledCode += numberLiteralNode.value;
```&lt;/p&gt;
&lt;p&gt;Because the value is not wrapped in quotes or otherwise sanitized, passing a string such as `{},{})) + process.getBuiltinModule(&amp;#39;child_process&amp;#39;).execFileSync(&amp;#39;id&amp;#39;).toString() //` as the `value` of a `NumberLiteral` causes the generated `eval`-ed code to break out of its intended context and execute arbitrary commands.&lt;/p&gt;
&lt;p&gt;Any endpoint that deserializes user-controlled JSON and passes the result directly to `Handlebars.compile()` is exploitable.&lt;/p&gt;
&lt;p&gt;## Proof of Concept&lt;/p&gt;
&lt;p&gt;Server-side Express application that passes `req.body.text` to `Handlebars.compile()`:&lt;/p&gt;
&lt;p&gt;```Javascript
import express from &amp;#34;express&amp;#34;;
import Handlebars from &amp;#34;handlebars&amp;#34;;&lt;/p&gt;
&lt;p&gt;const app = express();
app.use(expr…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-2w6w-674q-4c4q</guid>
    </item>
  </channel>
</rss>
