# nokogiri (RubyGems)

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.

- Latest: 1.19.7 (2026-11-02)
- Licence: MIT
- Downloads: 1314757897 all time
- Advisories on the latest version: 0

- CVE-2026-126064 LOW: Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value Fixed in 1.19.5.
- CVE-2026-126063 LOW: Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer Fixed in 1.19.5.
- CVE-2026-126062 LOW: JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host Fixed in 1.19.5.
- CVE-2026-57235 MODERATE: Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]` Fixed in 1.19.4.
- CVE-2026-57236 LOW: Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception Fixed in 1.19.4.
- CVE-2026-57234 LOW: Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247 Fixed in 1.19.4.
- CVE-2026-57434 LOW: Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes Fixed in 1.19.4.
- CVE-2026-57437 LOW: Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime Fixed in 1.19.4.
- CVE-2026-57435 LOW: Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=` Fixed in 1.19.4.
- CVE-2026-57438 LOW: Nokogiri: Possible Use-After-Free in XInclude Processing Fixed in 1.19.4.
- CVE-2026-57436 LOW: Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type Fixed in 1.19.4.
- CVE-2026-79770 HIGH: Nokogiri CSS selector tokenizer has regular expression backtracking Fixed in 1.19.3.
- CVE-2026-79771 MODERATE: Nokogiri XSLT transform has a memory leak Fixed in 1.19.3.
- CVE-2026-79772 MODERATE: Nokogiri does not check the return value from xmlC14NExecute Fixed in 1.19.1.
- GHSA-353f-x4gh-cqq8 CRITICAL: Nokogiri patches vendored libxml2 to resolve multiple CVEs Fixed in 1.18.9.
- GHSA-5w6v-399v-w3cc LOW: Nokogiri updates packaged libxml2 to v2.13.8 to resolve CVE-2025-32414 and CVE-2025-32415 Fixed in 1.18.8.
- GHSA-mrxw-mxhj-p664 HIGH: Nokogiri updates packaged libxslt to v1.1.43 to resolve multiple CVEs Fixed in 1.18.4.
- GHSA-vvfq-8hwr-qm4m LOW: Nokogiri updates packaged libxml2 to 2.13.6 to resolve CVE-2025-24928 and CVE-2024-56171 Fixed in 1.18.3.
- GHSA-r95h-9x8f-r3f7 LOW: Nokogiri updates packaged libxml2 to v2.12.7 to resolve CVE-2024-34459 Fixed in 1.16.5.
- GHSA-xc9x-jj77-9p9j MODERATE: Nokogiri update packaged libxml2 to v2.12.5 to resolve CVE-2024-25062 Fixed in 1.16.2, 1.15.6.
- GHSA-pxvg-2qj5-37jq MODERATE: Nokogiri updates packaged libxml2 to v2.10.4 to resolve multiple CVEs Fixed in 1.14.3.
- CVE-2022-23476 HIGH: Unchecked return value from xmlTextReaderExpand Fixed in 1.13.10.
- GHSA-2qc6-mcvw-92cw MODERATE: Update bundled libxml2 to v2.10.3 to resolve multiple CVEs Fixed in 1.13.9.
- CVE-2019-18197 HIGH: Nokogiri affected by libxslt Use of Uninitialized Resource/Use After Free vulnerability Fixed in 1.10.5.
- CVE-2021-3537 MODERATE: Nokogiri Implements libxml2 version vulnerable to null pointer dereferencing Fixed in 1.11.4.
- CVE-2019-13117 MODERATE: Uninitialized read in Nokogiri gem Fixed in 1.10.5.
- CVE-2021-30560 HIGH: Nokogiri has vulnerable dependencies on libxml2 and libxslt Fixed in 1.13.2.
- CVE-2019-13118 HIGH: libxslt Type Confusion vulnerability that affects Nokogiri Fixed in 1.10.5.
- CVE-2021-3517 HIGH: Nokogiri contains libxml Out-of-bounds Write vulnerability Fixed in 1.11.4.
- CVE-2021-3518 HIGH: Nokogiri Implements libxml2 version vulnerable to use-after-free Fixed in 1.11.4.
- CVE-2019-5815 HIGH: Nokogiri implementation of libxslt vulnerable to heap corruption Fixed in 1.10.5.
- CVE-2022-29181 HIGH: Nokogiri Improperly Handles Unexpected Data Type Fixed in 1.13.6.
- GHSA-cgx6-hpwq-fhv5 HIGH: Integer Overflow or Wraparound in libxml2 affects Nokogiri Fixed in 1.13.5.
- CVE-2017-15412 HIGH: Nokogiri gem, via libxml, is affected by DoS vulnerabilities Fixed in 1.8.2.
- CVE-2019-11068 CRITICAL: Nokogiri vulnerable to libxslt protection mechanism bypass Fixed in 1.10.3.
- CVE-2017-16932 HIGH: Nokogiri gem, via libxml, is affected by DoS vulnerabilities Fixed in 1.8.1.
- CVE-2013-6460 MODERATE: Nokogiri vulnerable to DoS while parsing XML documents Fixed in 1.5.11, 1.6.1.
- CVE-2013-6461 MODERATE: Nokogiri vulnerable to DoS while parsing XML entities Fixed in 1.5.11, 1.6.1.
- CVE-2012-6685 HIGH: Nokogiri is vulnerable to XML External Entity (XXE) attack Fixed in 1.5.4.
- CVE-2022-24836 HIGH: Nokogiri Inefficient Regular Expression Complexity Fixed in 1.13.4.

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