AploSec / Disclosures / CVE-2026-142213
xml2js through 0.6.2 XML Injection via Builder CDATA Escaping
CVE-2026-142213 · published 2026-12-02
In plain words: this type of bug lets someone inject their own content into data the application builds (injection). No fixed release is listed yet.
Summary
CVE-2026-142213 affects xml2js (npm) <= 0.6.2: XML Injection via Builder CDATA Escaping (CWE-91). No fixed release is listed. CVSS 4.0 base score 6.3 (Medium), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec), spokodev.
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.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
No fixed release is listed in the advisory. Check the references for upstream status.
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/xml2js-through-0.6.2-xml-injection-via-builder-cdata-escaping
- Fix pull requesthttps://github.com/Leonidas-from-XIV/node-xml2js/pull/724
- Vulnerable codehttps://github.com/Leonidas-from-XIV/node-xml2js/blob/0.6.2/lib/builder.js#L15-L21
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142213
- Severity
- Medium 6.3CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- xml2js
- Ecosystem
- npm
- Affected
- <= 0.6.2
- Fixed
- None
- Weakness
- CWE-91
- CNA
- VulnCheck
- Credit
- Zachariah Mithani (AploSec)finderspokodevfinder