Skip to content

Misinterpretation of malicious XML input

Moderate severity GitHub Reviewed Published Jul 27, 2021 in xmldom/xmldom • Updated Feb 22, 2024

Package

npm @xmldom/xmldom (npm)

Affected versions

< 0.7.0

Patched versions

0.7.0
npm xmldom (npm)
<= 0.6.0
None

Description

Impact

xmldom versions 0.6.0 and older do not correctly escape special characters when serializing elements removed from their ancestor. This may lead to unexpected syntactic changes during XML processing in some downstream applications.

Patches

Update to one of the fixed versions of @xmldom/xmldom (>=0.7.0)

See issue #271 for the status of publishing xmldom to npm or join #270 for Q&A/discussion until it's resolved.

Workarounds

Downstream applications can validate the input and reject the maliciously crafted documents.

References

Similar to this one reported on the Go standard library:

For more information

If you have any questions or comments about this advisory:

  • Open an issue in xmldom/xmldom
  • Email us: send an email to all addresses that are shown by npm owner ls @xmldom/xmldom

References

@karfau karfau published to xmldom/xmldom Jul 27, 2021
Published by the National Vulnerability Database Jul 27, 2021
Reviewed Aug 2, 2021
Published to the GitHub Advisory Database Aug 3, 2021
Last updated Feb 22, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

EPSS score

0.114%
(46th percentile)

Weaknesses

CVE ID

CVE-2021-32796

GHSA ID

GHSA-5fg8-2547-mr8q

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.