CVE-2021-21366: Misinterpretation of malicious XML input
4.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67754%
CWE
Published
3/12/2021
Updated
2/2/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
xmldom | npm | < 0.5.0 | 0.5.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from two key issues: 1) Incorrect quote handling in DOCTYPE
serialization (lib/dom.js
changes show quote preservation fixes) and 2) Missing duplicate attribute checks (sax.js
changes introduce attributeNames tracking). The commit adds ParseError
throwing for duplicates and modifies attribute handling in parseElementStartPart()
. These functions directly correspond to the CVE's impact areas - system identifier preservation and attribute conflict resolution.