Vulnerability · Published Mar 12, 2021 · Assigned by GitHub_M

CVE-2021-21366Misinterpretation of malicious XML input

Medium 4.3

In plain English

A medium-severity security flaw in xmldom from xmldom. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.3% (higher than 71% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.3Medium
Exploit odds (30 days)1.3%top 28.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. xmldom versions 0.4.0 and older do not correctly preserve system identifiers, FPIs or namespaces when repeatedly parsing and serializing maliciously crafted documents. This may lead to unexpected syntactic changes during XML processing in some downstream applications. This is fixed in version 0.5.0. As a workaround downstream applications can validate the input and reject the maliciously crafted documents.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-xmldom0.5.0-1DEBIAN-CVE-2021-21366
Debian:13node-xmldom0.5.0-1DEBIAN-CVE-2021-21366
Debian:14node-xmldom0.5.0-1DEBIAN-CVE-2021-21366
Ubuntu:22.04:LTSnode-xmldom0.7.5-1ubuntu0.22.04.1USN-6102-1
npmxmldom0.5.0GHSA-h6q6-9hqw-rwfv

Affected products (as reported)

VendorProductVersions
xmldom xmldom < 0.5.0

Weakness: CWE-436, CWE-115 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

References