CVE-2026-53962: Nokogiri Insecure Xml Sanitization

A Nokogiri-based XML/SVG sanitizer removes tags or attributes but fails to remove internal/external XML subsets or entity references. This allows an attacker to hide XSS payloads inside XML entities (`<!ENTITY ...>`) that seamlessly bypass the tag/attribute blocklist. Ensure you remove `internal_subset`, `external_subset`, and nodes of type `Nokogiri::XML::N

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Ruby
greprules fetch cve-2026-53962-nokogiri-insecure-xml-sanitization --engine opengrep

Description

A Nokogiri-based XML/SVG sanitizer removes tags or attributes but fails to remove internal/external XML subsets or entity references. This allows an attacker to hide XSS payloads inside XML entities (`<!ENTITY ...>`) that seamlessly bypass the tag/attribute blocklist. Ensure you remove `internal_subset`, `external_subset`, and nodes of type `Nokogiri::XML::N