npm
CVE-2026-142213
xml2js through 0.6.2 XML Injection via Builder CDATA Escaping
- Severity
- Medium 6.3
- Published
- 2 Dec 2026
- Last changed
- 2 Dec 2026
- Added to UpHeron
- 2 Dec 2026
- Weakness
- XML injection (CWE-91)
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change some data
- CVSS vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N- Sources
- CVE Program
Description
xml2js through 0.6.2 contains an XML injection vulnerability that allows attackers to break out of CDATA sections because escapeCDATA() in lib/builder.js only escapes the first ]]> sequence. Attackers controlling string values serialized with the cdata option can include a second ]]> to inject arbitrary elements and attributes, altering downstream XML parsing.
Affected software
| Software | Affected versions |
|---|---|
xml2jsnpm · osv:npm:xml2js |
|
About xml2js
- Weekly downloads (npm)
- 61,937,184npm, 2 Dec 2026
This is the only vulnerability in xml2js in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-142213