<?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-09-29T22:42:55.348253+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-jmr7-xgp7-cmfj</id>
    <title>GHSA-jmr7-xgp7-cmfj — fast-xml-parser affected by DoS through entity expansion in DOCTYPE (no expansion limit)</title>
    <updated>2026-09-29T22:42:55.350428+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
The XML parser can be forced to do an unlimited amount of entity expansion. With a very small XML input, it’s possible to make the parser spend seconds or even minutes processing a single request, effectively freezing the application.</p>
<p>### Details
There is a check in `DocTypeReader.js` that tries to prevent entity expansion attacks by rejecting entities that reference other entities (it looks for &amp; inside entity values). This does stop classic “Billion Laughs” payloads.</p>
<p>However, it doesn’t stop a much simpler variant.</p>
<p>If you define one large entity that contains only raw text (no &amp; characters) and then reference it many times, the parser will happily expand it every time. There is no limit on how large the expanded result can become, or how many replacements are allowed.</p>
<p>The problem is in `replaceEntitiesValue()` inside `OrderedObjParser.js`. It repeatedly runs `val.replace()` in a loop, without any checks on total output size or execution cost. As the entity grows or the number of references increases, parsing time explodes.</p>
<p>Relevant code:</p>
<p>`DocTypeReader.js` (lines 28–33): entity registration only checks for &amp;</p>
<p>`OrderedObjParser.js` (lines 439–458): entity replacement loop with no limits</p>
<p>### PoC</p>
<p>```js
const { XMLParser } = require('fast-xml-parser');</p>
<p>const entity = 'A'.repeat(1000);
const refs = '&amp;big;'.repeat(100);
const xml = `&lt;!DOCTYPE foo [&lt;!ENTITY big "${entity}"&gt;]&gt;&lt;root&gt;${refs}&lt;/root&gt;`;</p>
<p>console.time('parse');
new XMLParser().parse(xml); // ~4–8 se…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-jmr7-xgp7-cmfj"/>
  </entry>
</feed>
