{"id":"CVE-2026-57436","aliases":["GHSA-wjv4-x9w8-wm3h"],"url":"https://o3.security/vulnerability/CVE-2026-57436","summary":"Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type","details":"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.","published":"2026-06-25T14:33:29.496Z","modified":"2026-08-12T03:51:19.811241695Z","cvss":null,"epss":{"score":0.00402,"percentile":0.33515,"asOf":"2026-09-07"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"RubyGems","name":"nokogiri","fixedVersion":"1.19.4"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57436.json"},{"type":"ADVISORY","url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wjv4-x9w8-wm3h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57436"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:19.811241695Z"}}