Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

CVE-2021-32796

MEDIUM

CVE-2021-32796 is a medium-severity (CVSS 5.3) CWE-116 vulnerability in xmldom. O3 Security confirms whether CVE-2021-32796 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Misinterpretation of malicious XML input

Also known asGHSA-5fg8-2547-mr8q
Published
Jul 27, 2021
Updated
Aug 4, 2026
Affected
2 pkgs
Patched
1 / 2
Exploits
None indexed

Blast Radius

2 pkgs affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

xmldomnpm
1.5Mdownloads / week
@xmldom/xmldomnpm
42.3Mdownloads / week

Description

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.

Affected Packages

2 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmxmldomall versionsNo fix
📦npm@xmldom/xmldomall versions0.7.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for xmldom. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    No patched version of xmldom has shipped for CVE-2021-32796 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2021-32796 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2021-32796. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2021-32796 in your dependencies?

O3 detects CVE-2021-32796 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.