<?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-02T14:57:00.318101+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-jp2q-39xq-3w4g</id>
    <title>GHSA-jp2q-39xq-3w4g — Entity Expansion Limits Bypassed When Set to Zero Due to JavaScript Falsy Evaluation in fast-xml-parser</title>
    <updated>2026-10-02T14:57:00.335881+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: fast-xml-parser</p>
<p>## Summary</p>
<p>The `DocTypeReader` in fast-xml-parser uses JavaScript truthy checks to evaluate `maxEntityCount` and `maxEntitySize` configuration limits. When a developer explicitly sets either limit to `0` — intending to disallow all entities or restrict entity size to zero bytes — the falsy nature of `0` in JavaScript causes the guard conditions to short-circuit, completely bypassing the limits. An attacker who can supply XML input to such an application can trigger unbounded entity expansion, leading to memory exhaustion and denial of service.</p>
<p>## Details</p>
<p>The `OptionsBuilder.js` correctly preserves a user-supplied value of `0` using nullish coalescing (`??`):</p>
<p>```js
// src/xmlparser/OptionsBuilder.js:111
maxEntityCount: value.maxEntityCount ?? 100,
// src/xmlparser/OptionsBuilder.js:107
maxEntitySize: value.maxEntitySize ?? 10000,
```</p>
<p>However, `DocTypeReader.js` uses truthy evaluation to check these limits. Because `0` is falsy in JavaScript, the entire guard expression short-circuits to `false`, and the limit is never enforced:</p>
<p>```js
// src/xmlparser/DocTypeReader.js:30-32
if (this.options.enabled !== false &amp;&amp;
    this.options.maxEntityCount &amp;&amp;          // ← 0 is falsy, skips check
    entityCount &gt;= this.options.maxEntityCount) {
    throw new Error(`Entity count ...`);
}
```</p>
<p>```js
// src/xmlparser/DocTypeReader.js:128-130
if (this.options.enabled !== false &amp;&amp;
    this.options.maxEntitySize &amp;&amp;            // ← 0 is falsy, skips check
    entityValue.length &gt; this.optio…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-jp2q-39xq-3w4g"/>
  </entry>
</feed>
