naturalintelligence/fast-xml-builder · Security
fast-xml-builder allows attribute values with unwanted quotes to bypass malicious or unwanted attributes
- GHSA ID
- GHSA-5wm8-gmm8-39j9
- CVE ID
- CVE-2026-44665
- Severity
- high
- Published
- Updated
- CVSS
- 6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CVSS v3
- 6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CVSS v4
- 8.7 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Description
Summary
When an input data has quotes in attribute values but process entities is not enabled, it breaks the attribute value into multiple attributes. This gives the room for an attacker to insert unwanted attributes to the XML/HTML.
Detail
Malicious Input
{
a: {
"@_attr": '" onClick="alert(1)'
}
}
Output
<a attr="" onClick="alert(1)"></a>
Workarounds
If you're not ignoring attributes then keep processEntities flag true.
CWEs
- CWE-91 · XML Injection (aka Blind XPath Injection)
- CWE-611 · Improper Restriction of XML External Entity Reference