# CVE-2026-142213: xml2js through 0.6.2 XML Injection via Builder CDATA Escaping

Source: https://aplosec.si/cve/CVE-2026-142213/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142213

Medium 6.3 · Reported · No fix listed · CWE-91 · Multiple credited contributors · npm

# 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](https://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](https://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](https://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](https://www.cve.org/CVERecord?id=CVE-2026-142213)

**Severity:** Medium 6.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142213)

**Package:** xml2js

**Ecosystem:** npm

**Affected:** <= 0.6.2

**Fixed:** None

**Weakness:** CWE-91

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder · spokodev finder
