nokogiri

Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is fast and standards-compliant by relying on native parsers like libxml2, libgumbo, or xerces.

1.19.7Latest, 2 Nov 2026
1.3BDownloads, all time
0Advisories on the latest
40Advisories, all versions
MITLicence
6.3KStars
7.5/10OpenSSF Scorecard

Known advisories

Severity Advisory Fix Published
Low Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value CVE-2026-126064 Fixed in 1.19.5 10 Nov 2026
Low Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer CVE-2026-126063 Fixed in 1.19.5 10 Nov 2026
Low JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host CVE-2026-126062 Fixed in 1.19.5 10 Nov 2026
Moderate Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]` CVE-2026-57235 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception CVE-2026-57236 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247 CVE-2026-57234 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes CVE-2026-57434 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime CVE-2026-57437 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=` CVE-2026-57435 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: Possible Use-After-Free in XInclude Processing CVE-2026-57438 Fixed in 1.19.4 19 Jun 2026
Low Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type CVE-2026-57436 Fixed in 1.19.4 19 Jun 2026
High Nokogiri CSS selector tokenizer has regular expression backtracking CVE-2026-79770 Fixed in 1.19.3 6 May 2026
Moderate Nokogiri XSLT transform has a memory leak CVE-2026-79771 Fixed in 1.19.3 6 May 2026
Moderate Nokogiri does not check the return value from xmlC14NExecute CVE-2026-79772 Fixed in 1.19.1 18 Feb 2026
Critical Nokogiri patches vendored libxml2 to resolve multiple CVEs GHSA-353f-x4gh-cqq8 Fixed in 1.18.9 21 Jul 2025

In the news

On Hacker News

Sources: RubyGems, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.