CVE-2023-34104: Regex Injection via Doctype Entities

Published Jun 6, 2023
·
Updated

Impact "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 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.

Patches The problem has been resolved in v4.2.4

Workarounds Avoid using DOCTYPE parsing by processEntities: false option.

Other sources

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.

MITRE

Natural Intelligence fast-xml-parser is vulnerable to a denial of service, caused by a regular expression denial of service (ReDoS) flaw in the Doctype Entities. By sending a specially crafted regex input, a remote attacker could exploit this vulnerability to cause a denial of service condition.

IBM

Affected Software

6 affected componentsFixes available
npm/fast-xml-parser>=4.1.3<4.2.4
4.2.4
redhat/fast-xml-parser<4.2.4
4.2.4
IBM Cloud Pak for Security<=1.10.0.0 - 1.10.11.0
IBM QRadar Suite Software<=1.10.12.0 - 1.10.16.0
Fast-xml-parser Project Fast-xml-parser Node.js<4.2.4
NaturalIntelligence fast-xml-parser<4.2.4

Event History

Jun 6, 2023
Advisory Published
via GitHub·05:33 PM
CVE Published
via MITRE·05:35 PM
Data Sourced
via MITRE·05:35 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2023-34104.

2

What is the severity of CVE-2023-34104?

The severity of CVE-2023-34104 is high with a CVSS score of 7.5.

3

How does the vulnerability in fast-xml-parser affect the software?

The vulnerability in fast-xml-parser allows for a denial of service attack caused by a regular expression denial of service (ReDoS) vulnerability.

4

Which versions of fast-xml-parser are affected?

Versions up to but excluding 4.2.4 of fast-xml-parser are affected.

5

How can I fix the vulnerability in fast-xml-parser?

To fix the vulnerability in fast-xml-parser, update to version 4.2.4 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203