Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-32796

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-32796
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:17 UTC · Revision 1

Source evidence

CVE-2021-32796

core-osv · Original source

Published 27 Jul 2021, 22:15 UTC

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.

osv:CVE-2021-32796
Complete source record
{
  "id": "912387bb21f846637bb62cd642b71d30f710f05970073f0a916e8cdeb4ad5b0f",
  "url": "https://osv.dev/vulnerability/CVE-2021-32796",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-32796",
    "summary": "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.",
    "evidence": "osv:CVE-2021-32796",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-32796",
      "aliases": [
        "CVE-2021-32796",
        "GHSA-5fg8-2547-mr8q"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/xmldom/xmldom",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c568938641cc1f121cef5b4df80fcfda1e489b6e"
                },
                {
                  "fixed": "7b4b743917a892d407356e055b296dcd6d107e8b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:xmldom_project:xmldom:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.7.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "7b4b743917a892d407356e055b296dcd6d107e8b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.6.0",
            "0.5.0",
            "0.4.0",
            "0.3.0",
            "0.2.1",
            "0.2.0",
            "v0.1.28-xmldom-alpha",
            "v0.1.28-not-published",
            "xmldom-aplha@v0.1.28",
            "v0.1.27",
            "0.1.27",
            "0.1.26",
            "0.1.25",
            "0.1.24",
            "0.1.23",
            "0.1.22",
            "0.1.21",
            "0.1.20",
            "0.1.19",
            "0.1.18",
            "0.1.17",
            "0.1.2",
            "0.1.1",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-32796.json"
          }
        }
      ],
      "modified": "2026-10-20T10:53:46.147627889Z",
      "provider": "osv",
      "references": [
        "https://github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q",
        "https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities/",
        "https://github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-32796",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384600,
  "published_at": "2021-07-27T22:15:07.69+00:00"
}