<?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://vulnerability.circl.lu</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>Tue, 29 Sep 2026 06:32:54 +0000</lastBuildDate>
    <item>
      <title>GHSA-m7jm-9gc2-mpf2 — fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-m7jm-9gc2-mpf2</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: fast-xml-parser&lt;/p&gt;
&lt;p&gt;# Entity encoding bypass via regex injection in DOCTYPE entity names&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;A dot (`.`) in a DOCTYPE entity name is treated as a regex wildcard during entity replacement, allowing an attacker to shadow built-in XML entities (`&amp;amp;lt;`, `&amp;amp;gt;`, `&amp;amp;amp;`, `&amp;amp;quot;`, `&amp;amp;apos;`) with arbitrary values. This bypasses entity encoding and leads to XSS when parsed output is rendered.&lt;/p&gt;
&lt;p&gt;## Details&lt;/p&gt;
&lt;p&gt;The fix for CVE-2023-34104 addressed some regex metacharacters in entity names but missed `.` (period), which is valid in XML names per the W3C spec.&lt;/p&gt;
&lt;p&gt;In `DocTypeReader.js`, entity names are passed directly to `RegExp()`:&lt;/p&gt;
&lt;p&gt;```js
entities[entityName] = {
    regx: RegExp(`&amp;amp;${entityName};`, &amp;#34;g&amp;#34;),
    val: val
};
```&lt;/p&gt;
&lt;p&gt;An entity named `l.` produces the regex `/&amp;amp;l.;/g` where `.` matches **any character**, including the `t` in `&amp;amp;lt;`. Since DOCTYPE entities are replaced before built-in entities, this shadows `&amp;amp;lt;` entirely.&lt;/p&gt;
&lt;p&gt;The same issue exists in `OrderedObjParser.js:81` (`addExternalEntities`), and in the v6 codebase - `EntitiesParser.js` has a `validateEntityName` function with a character blacklist, but `.` is not included:&lt;/p&gt;
&lt;p&gt;```js
// v6 EntitiesParser.js line 96
const specialChar = &amp;#34;!?\\/[]$%{}^&amp;amp;*()&amp;lt;&amp;gt;|+&amp;#34;;  // no dot
```&lt;/p&gt;
&lt;p&gt;## Shadowing all 5 built-in entities&lt;/p&gt;
&lt;p&gt;| Entity name | Regex created | Shadows |
|---|---|---|
| `l.` | `/&amp;amp;l.;/g` | `&amp;amp;lt;` |
| `g.` | `/&amp;amp;g.;/g` | `&amp;amp;gt;` |
| `am.` | `/&amp;amp;am.;/g` | `&amp;amp;amp;` |
| `quo.` | `/&amp;amp;quo.;/g` | `&amp;amp;quot;` |
| `apo.` | `/&amp;amp;apo.;/g` | `&amp;amp;apos;` |&lt;/p&gt;
&lt;p&gt;## PoC&lt;/p&gt;
&lt;p&gt;```js…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: fast-xml-parser&lt;/p&gt;
&lt;p&gt;# Entity encoding bypass via regex injection in DOCTYPE entity names&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;A dot (`.`) in a DOCTYPE entity name is treated as a regex wildcard during entity replacement, allowing an attacker to shadow built-in XML entities (`&amp;amp;lt;`, `&amp;amp;gt;`, `&amp;amp;amp;`, `&amp;amp;quot;`, `&amp;amp;apos;`) with arbitrary values. This bypasses entity encoding and leads to XSS when parsed output is rendered.&lt;/p&gt;
&lt;p&gt;## Details&lt;/p&gt;
&lt;p&gt;The fix for CVE-2023-34104 addressed some regex metacharacters in entity names but missed `.` (period), which is valid in XML names per the W3C spec.&lt;/p&gt;
&lt;p&gt;In `DocTypeReader.js`, entity names are passed directly to `RegExp()`:&lt;/p&gt;
&lt;p&gt;```js
entities[entityName] = {
    regx: RegExp(`&amp;amp;${entityName};`, &amp;#34;g&amp;#34;),
    val: val
};
```&lt;/p&gt;
&lt;p&gt;An entity named `l.` produces the regex `/&amp;amp;l.;/g` where `.` matches **any character**, including the `t` in `&amp;amp;lt;`. Since DOCTYPE entities are replaced before built-in entities, this shadows `&amp;amp;lt;` entirely.&lt;/p&gt;
&lt;p&gt;The same issue exists in `OrderedObjParser.js:81` (`addExternalEntities`), and in the v6 codebase - `EntitiesParser.js` has a `validateEntityName` function with a character blacklist, but `.` is not included:&lt;/p&gt;
&lt;p&gt;```js
// v6 EntitiesParser.js line 96
const specialChar = &amp;#34;!?\\/[]$%{}^&amp;amp;*()&amp;lt;&amp;gt;|+&amp;#34;;  // no dot
```&lt;/p&gt;
&lt;p&gt;## Shadowing all 5 built-in entities&lt;/p&gt;
&lt;p&gt;| Entity name | Regex created | Shadows |
|---|---|---|
| `l.` | `/&amp;amp;l.;/g` | `&amp;amp;lt;` |
| `g.` | `/&amp;amp;g.;/g` | `&amp;amp;gt;` |
| `am.` | `/&amp;amp;am.;/g` | `&amp;amp;amp;` |
| `quo.` | `/&amp;amp;quo.;/g` | `&amp;amp;quot;` |
| `apo.` | `/&amp;amp;apo.;/g` | `&amp;amp;apos;` |&lt;/p&gt;
&lt;p&gt;## PoC&lt;/p&gt;
&lt;p&gt;```js…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-m7jm-9gc2-mpf2</guid>
    </item>
  </channel>
</rss>
