Skip to main content
← All vulnerabilities
CVE-2026-57436GHSA-WJV4-X9W8-WM3H

Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.19.4
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: total

Summary

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::Document#root= validated only that the new root was a Nokogiri::XML::Node, allowing a DTD node to be set as the document root. The result is a heap use-after-free during garbage collection or finalization, leading to an invalid memory read or potentially a segfault. This vulnerability is fixed in 1.19.4.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • sparklemotion nokogiri

    fixed in 1.19.4

  • nokogiriRubyGems

    fixed in 1.19.4

References 1

GitHub · sparklemotion/nokogiri