Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @xmldom/xmldom
  4. ›
  5. CVE-2021-32796

CVE-2021-32796: Improper Encoding or Escaping of Output

July 27, 2021 (updated April 25, 2022)

xmldom is an open source pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. 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. This issue has been resolved in version 0.7.0. As a workaround downstream applications can validate the input and reject the maliciously crafted documents.

References

  • github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b
  • github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q
  • mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities/
  • nvd.nist.gov/vuln/detail/CVE-2021-32796

Code Behaviors & Features

Detect and mitigate CVE-2021-32796 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.7.0

Fixed versions

  • 0.7.0

Solution

Upgrade to version 0.7.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output

Source file

npm/@xmldom/xmldom/CVE-2021-32796.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:02 +0000.