{"id":"CVE-2023-34104","published":"2023-06-06T17:35:54Z","modified":"2024-08-02T16:01:54Z","title":"Regex Injection via Doctype Entities","vendor":"NaturalIntelligence","product":"fast-xml-parser","tier":"tail","description":{"text":"fast-xml-parser is an open source, pure javascript xml parser. fast-xml-parser allows special characters in entity names, which are not escaped or sanitized. Since the entity name is used for creating a regex for searching and replacing entities in the XML body, an attacker can abuse it for denial of service (DoS) attacks. By crafting an entity name that results in an intentionally bad performing regex and utilizing it in the entity replacement step of the parser, this can cause the parser to stall for an indefinite amount of time. This problem has been resolved in v4.2.4. Users are advised to upgrade. Users unable to upgrade should avoid using DOCTYPE parsing by setting the `processEntities: false` option.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01126,"percentile":0.67089,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-6w63-h3fj-q4vw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/commit/39b0e050bb909e8499478657f84a3076e39ce76c","tags":["x_refsource_MISC"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/commit/a4bdced80369892ee413bf08e28b78795a2b0d5b","tags":["x_refsource_MISC"]}],"priority":{"score":18.7,"factors":[{"name":"EPSS percentile","points":13.42},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"naturalintelligence","affectedVersions":[{"vendor":"NaturalIntelligence","product":"fast-xml-parser","versions":[">= 4.1.3, < 4.2.4"]}],"affected":[{"ecosystem":"npm","package":"fast-xml-parser","vulnerableRanges":[">=4.1.3, <4.2.4"],"patched":["4.2.4"],"from":["GHSA-6w63-h3fj-q4vw"],"provenance":"source"}],"summary":{"text":"The fast-xml-parser JavaScript XML parser from NaturalIntelligence does not escape or sanitise special characters in DOCTYPE entity names, and those names are used to build regular expressions for entity replacement. An attacker with network access and no authentication or user interaction can send a crafted entity name that produces a pathologically slow regex, stalling the parser for an indefinite period when DOCTYPE entity processing is enabled (the default), with the fix in v4.2.4 and the workaround of setting processEntities: false.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:14Z"},"euvd":{"id":"EUVD-2023-1717","exploited":false,"provenance":"source"}}