RubyGems (Ruby)Worst: Critical68 advisories
nokogiri: known vulnerabilities
nokogiri has 68 reviewed security advisories in the GitHub Advisory Database — 4 critical, 27 high, 20 moderate, 17 low. The most recent was published 2026-11-10. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the nokogiri versions running across your servers, containers and images, and ranks what to patch first.
How to fix nokogiri
Upgrade nokogiri to a release at or above the fixed version shown for each advisory below. For RubyGems (Ruby):
bundle update nokogiri to 1.19.5 (or gem install nokogiri -v 1.19.5)
SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.
Advisories (68)
Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
Low CWE-416
— Affected: before 1.19.5. Fixed in 1.19.5. Published 2026-11-10. GHSA-3w22-6jfg-527w · CVE-2026-126064
Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer
Low CWE-116 CWE-79
— Affected: from 1.12.0 up to 1.19.5. Fixed in 1.19.5. Published 2026-11-10. GHSA-4p39-36wj-23h4 · CVE-2026-126063
JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host
Low 3.7 CWE-611 CWE-918
— Affected: before 1.19.5. Fixed in 1.19.5. Published 2026-11-10. GHSA-v995-44v6-5fqm · CVE-2026-126062
Duplicate Advisory: Nokogiri CSS selector tokenizer has regular expression backtracking
High 7.5 CWE-1333
— Affected versions listed in the advisory. No fixed release is listed. Published 2026-08-25. GHSA-5jhf-fpp7-v2pv
Duplicate Advisory: Nokogiri XSLT transform has a memory leak
Moderate 5.3 CWE-401
— Affected versions listed in the advisory. No fixed release is listed. Published 2026-08-25. GHSA-rh9x-7xjc-vwx2
Duplicate Advisory: Nokogiri does not check the return value from xmlC14NExecute
Moderate 5.3 CWE-252
— Affected versions listed in the advisory. No fixed release is listed. Published 2026-08-25. GHSA-xqqh-3w52-q8p7
Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`
Moderate CWE-125 CWE-190
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-5prr-v3j2-97mh · CVE-2026-57235
Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception
Low CWE-416
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-5v8h-3h3q-446p · CVE-2026-57236
Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247
Low 2.6 CWE-178 CWE-184 CWE-611
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-8678-w3jw-xfc2 · CVE-2026-57234
Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes
Low CWE-476
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-9cv2-cfxc-v4v2 · CVE-2026-57434
Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime
Low CWE-416
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-p67v-3w7g-wjg7 · CVE-2026-57437
Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=`
Low CWE-416 CWE-825
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-phwj-rprq-35pp · CVE-2026-57435
Nokogiri: Possible Use-After-Free in XInclude Processing
Low CWE-416
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-wfpw-mmfh-qq69 · CVE-2026-57438
Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type
Low CWE-416
— Affected: before 1.19.4. Fixed in 1.19.4. Published 2026-06-19. GHSA-wjv4-x9w8-wm3h · CVE-2026-57436
Nokogiri CSS selector tokenizer has regular expression backtracking
High 7.5 CWE-1333
— Affected: before 1.19.3. Fixed in 1.19.3. Published 2026-05-06. GHSA-c4rq-3m3g-8wgx · CVE-2026-79770
Nokogiri XSLT transform has a memory leak
Moderate 5.3 CWE-401
— Affected: before 1.19.3. Fixed in 1.19.3. Published 2026-05-06. GHSA-v2fc-qm4h-8hqv · CVE-2026-79771
Nokogiri does not check the return value from xmlC14NExecute
Moderate 5.3 CWE-252
— Affected: from 1.5.1 up to 1.19.1. Fixed in 1.19.1. Published 2026-02-18. GHSA-wx95-c6cv-8532 · CVE-2026-79772
Nokogiri patches vendored libxml2 to resolve multiple CVEs
Critical
— Affected: before 1.18.9. Fixed in 1.18.9. Published 2025-07-21. GHSA-353f-x4gh-cqq8
sparklemotion nokogiri hashmap.c hashmap_get_with_hash heap-based overflow
Low 3.3 CWE-119
— Affected versions listed in the advisory. No fixed release is listed. Published 2025-06-22. GHSA-jc9r-qcgw-fxq9 · CVE-2025-6494
sparklemotion nokogiri hashmap.c hashmap_set_with_hash heap-based overflow
Low 3.3 CWE-119
— Affected versions listed in the advisory. No fixed release is listed. Published 2025-06-22. GHSA-pf9w-gvcf-gv7m · CVE-2025-6490
Nokogiri updates packaged libxml2 to v2.13.8 to resolve CVE-2025-32414 and CVE-2025-32415
Low CWE-1395
— Affected: before 1.18.8. Fixed in 1.18.8. Published 2025-04-21. GHSA-5w6v-399v-w3cc · CVE-2025-71346
Nokogiri updates packaged libxslt to v1.1.43 to resolve multiple CVEs
High 7.8 CWE-1395 CWE-416
— Affected: before 1.18.4. Fixed in 1.18.4. Published 2025-03-14. GHSA-mrxw-mxhj-p664 · CVE-2025-71406
Duplicate Advisory: Nokogiri updates packaged libxml2 to 2.13.6 to resolve CVE-2025-24928 and CVE-2024-56171
Low CWE-1395
— Affected: before 1.18.3. Fixed in 1.18.3. Published 2025-02-19. GHSA-5mwf-688x-mr7x
Nokogiri updates packaged libxml2 to 2.13.6 to resolve CVE-2025-24928 and CVE-2024-56171
Low CWE-121 CWE-1395 CWE-416
— Affected: before 1.18.3. Fixed in 1.18.3. Published 2025-02-18. GHSA-vvfq-8hwr-qm4m · CVE-2025-71407
Duplicate Advisory: Nokogiri updates packaged libxml2 to v2.12.7 to resolve CVE-2024-34459
Low CWE-119
— Affected: before 1.16.5. Fixed in 1.16.5. Published 2024-05-14. GHSA-r3w4-36x6-7r99
Nokogiri updates packaged libxml2 to v2.12.7 to resolve CVE-2024-34459
Low CWE-120
— Affected: before 1.16.5. Fixed in 1.16.5. Published 2024-05-13. GHSA-r95h-9x8f-r3f7 · CVE-2024-58377
Duplicate Advisory: Use-after-free in libxml2 via Nokogiri::XML::Reader
Moderate CWE-416
— Affected: from 1.16.0 up to 1.16.2. Fixed in 1.16.2. Published 2024-03-18. GHSA-vcc3-rw6f-jv97
Nokogiri update packaged libxml2 to v2.12.5 to resolve CVE-2024-25062
Moderate CWE-416
— Affected: before 1.15.6. Fixed in 1.15.6. Published 2024-02-05. GHSA-xc9x-jj77-9p9j · CVE-2024-58378
Nokogiri updates packaged libxml2 to v2.10.4 to resolve multiple CVEs
Moderate
— Affected: before 1.14.3. Fixed in 1.14.3. Published 2023-04-11. GHSA-pxvg-2qj5-37jq · CVE-2023-54354
Unchecked return value from xmlTextReaderExpand
High 7.5 CWE-252 CWE-476
— Affected: from 1.13.8 up to 1.13.10. Fixed in 1.13.10. Published 2022-12-08. GHSA-qv4q-mr5r-qprj · CVE-2022-23476
Update bundled libxml2 to v2.10.3 to resolve multiple CVEs
Moderate
— Affected: before 1.13.9. Fixed in 1.13.9. Published 2022-10-18. GHSA-2qc6-mcvw-92cw · CVE-2022-50998
Nokogiri Improperly Handles Unexpected Data Type
High 8.2 CWE-241 CWE-843
— Affected: before 1.13.6. Fixed in 1.13.6. Published 2022-05-20. GHSA-xh29-r2w5-wx8m · CVE-2022-29181
Integer Overflow or Wraparound in libxml2 affects Nokogiri
High 8.6 CWE-190
— Affected: before 1.13.5. Fixed in 1.13.5. Published 2022-05-18. GHSA-cgx6-hpwq-fhv5 · CVE-2022-50999
Nokogiri Inefficient Regular Expression Complexity
High 7.5 CWE-1333 CWE-400
— Affected: before 1.13.4. Fixed in 1.13.4. Published 2022-04-11. GHSA-crjr-9rc5-ghw8 · CVE-2022-24836
Denial of Service (DoS) in Nokogiri on JRuby
High 7.5 CWE-400
— Affected: before 1.13.4. Fixed in 1.13.4. Published 2022-04-11. GHSA-gx8x-g87m-h5q6
Out-of-bounds Write in zlib affects Nokogiri
High 7.5 CWE-787
— Affected: before 1.13.4. Fixed in 1.13.4. Published 2022-04-11. GHSA-v6gp-9mmm-c6p5
XML Injection in Xerces Java affects Nokogiri
Moderate 6.5 CWE-91
— Affected: before 1.13.4. Fixed in 1.13.4. Published 2022-04-11. GHSA-xxx9-3xcr-gjj3
Nokogiri affected by zlib's Out-of-bounds Write vulnerability
High 7.5 CWE-787
— Affected: before 1.13.4. Fixed in 1.13.4. Published 2022-03-25. GHSA-jc36-42cf-vqwj · CVE-2018-25032
Vulnerable dependencies in Nokogiri
High CWE-416
— Affected: before 1.13.2. Fixed in 1.13.2. Published 2022-02-25. GHSA-fq42-c5rg-92c2 · CVE-2022-51000
Improper Restriction of XML External Entity Reference (XXE) in Nokogiri on JRuby
High 7.5 CWE-611
— Affected: before 1.12.5. Fixed in 1.12.5. Published 2021-09-27. GHSA-2rr5-8q37-2w7h · CVE-2021-41098
Nokogiri has vulnerable dependencies on libxml2 and libxslt
High 8.8 CWE-416
— Affected: before 1.13.2. Fixed in 1.13.2. Published 2021-08-03. GHSA-59gp-qqm7-cw4j · CVE-2021-30560
Nokogiri contains libxml Out-of-bounds Write vulnerability
High 8.6 CWE-787
— Affected: before 1.11.4. Fixed in 1.11.4. Published 2021-05-19. GHSA-jw9f-hh49-cvp9 · CVE-2021-3517
Nokogiri Implements libxml2 version vulnerable to use-after-free
High 8.8 CWE-416
— Affected: before 1.11.4. Fixed in 1.11.4. Published 2021-05-18. GHSA-v4f8-2847-rwm7 · CVE-2021-3518
Nokogiri updates packaged dependency on libxml2 from 2.9.10 to 2.9.12
Moderate
— Affected: before 1.11.4. Fixed in 1.11.4. Published 2021-05-17. GHSA-7rrm-v45f-jp64 · CVE-2021-47996
Nokogiri Implements libxml2 version vulnerable to null pointer dereferencing
Moderate 5.9 CWE-476
— Affected: before 1.11.4. Fixed in 1.11.4. Published 2021-05-14. GHSA-286v-pcf5-25rc · CVE-2021-3537
Nokogiri::XML::Schema trusts input by default, exposing risk of XXE vulnerability
Moderate 4.3 CWE-611
— Affected: before 1.11.0. Fixed in 1.11.0. Published 2020-12-30. GHSA-vr8q-g5c7-m54m · CVE-2020-26247
Nokogiri is vulnerable to XML External Entity (XXE) attack
High 7.5 CWE-776
— Affected: before 1.5.4. Fixed in 1.5.4. Published 2020-02-19. GHSA-6wj9-77wq-jq7p · CVE-2012-6685
libxml as used in Nokogiri has an infinite loop in a certain end-of-file situation
High 7.5 CWE-835
— Affected: before 1.10.8. Fixed in 1.10.8. Published 2020-01-21. GHSA-7553-jr98-vx47 · CVE-2020-7595
Nokogiri implementation of libxslt vulnerable to heap corruption
High 7.5 CWE-787 CWE-843
— Affected: before 1.10.5. Fixed in 1.10.5. Published 2019-12-11. GHSA-vmfx-gcfq-wvm2 · CVE-2019-5815
Nokogiri vulnerable to DoS while parsing XML documents
Moderate 6.5 CWE-776
— Affected: from 1.6.0 up to 1.6.1. Fixed in 1.6.1. Published 2019-11-05. GHSA-62qp-3fxm-9wxf · CVE-2013-6460
Nokogiri vulnerable to DoS while parsing XML entities
Moderate 6.5 CWE-776
— Affected: from 1.6.0 up to 1.6.1. Fixed in 1.6.1. Published 2019-11-05. GHSA-jmhh-w7xp-wg39 · CVE-2013-6461
Nokogiri affected by libxslt Use of Uninitialized Resource/Use After Free vulnerability
High 7.5 CWE-416 CWE-908
— Affected: before 1.10.5. Fixed in 1.10.5. Published 2019-10-18. GHSA-242x-7cm6-4w8j · CVE-2019-18197
Nokogiri Command Injection Vulnerability
Critical 9.8 CWE-78
— Affected: before 1.10.4. Fixed in 1.10.4. Published 2019-08-16. GHSA-cr5j-953j-xw5p · CVE-2019-5477
Uninitialized read in Nokogiri gem
Moderate 5.3 CWE-908
— Affected: before 1.10.5. Fixed in 1.10.5. Published 2019-07-01. GHSA-4hm9-844j-jmxp · CVE-2019-13117
libxslt Type Confusion vulnerability that affects Nokogiri
High 7.5 CWE-843
— Affected: before 1.10.5. Fixed in 1.10.5. Published 2019-07-01. GHSA-cf46-6xxh-pc75 · CVE-2019-13118
Nokogiri vulnerable to libxslt protection mechanism bypass
Critical 9.8
— Affected: before 1.10.3. Fixed in 1.10.3. Published 2019-04-10. GHSA-qxcg-xjjg-66mj · CVE-2019-11068
Denial of service or RCE from libxml2 and libxslt
High 7.5 CWE-125
— Affected: from 1.6.0 up to 1.6.8. Fixed in 1.6.8. Published 2018-09-17. GHSA-7hp2-xwpj-95jq · CVE-2015-8806
Nokogiri gem, via libxml, is affected by DoS vulnerabilities
High 8.8 CWE-416
— Affected: before 1.8.2. Fixed in 1.8.2. Published 2018-08-28. GHSA-r58r-74gx-6wx3 · CVE-2017-15412
Nokogiri subject to DoS via libxml2 vulnerability
High CWE-400
— Affected: from 1.6.0 up to 1.6.7.1. Fixed in 1.6.7.1. Published 2018-08-21. GHSA-xjqg-9jvg-fgx2 · CVE-2015-5312
Nokogiri vulnerable to libxml XML Entity Expansion
Moderate CWE-776
— Affected: from 1.6.6.0 up to 1.6.6.4. Fixed in 1.6.6.4. Published 2018-08-08. GHSA-q7wx-62r7-j2x7 · CVE-2015-1819
Nokogiri NULL Pointer Dereference
High 7.5 CWE-476
— Affected: before 1.8.5. Fixed in 1.8.5. Published 2018-07-19. GHSA-6qvp-r6r3-9p7h · CVE-2018-14404
Uncontrolled resource consumption in nokogiri
Moderate 6.5 CWE-770
— Affected: before 1.8.2. Fixed in 1.8.2. Published 2018-04-08. GHSA-882p-jqgm-f45g · CVE-2017-18258
Cross-site Scripting in loofah
Moderate 6.1 CWE-79
— Affected: before 1.8.3. Fixed in 1.8.3. Published 2018-03-21. GHSA-x7rv-cr6v-4vm4 · CVE-2018-8048
Nokogiri gem, via libxml, is affected by DoS vulnerabilities
High 7.5 CWE-835
— Affected: before 1.8.1. Fixed in 1.8.1. Published 2017-11-23. GHSA-x2fm-93ww-ggvx · CVE-2017-16932
Out-of-bounds read in nokogiri
High 7.5 CWE-125
— Affected: before 1.8.1. Fixed in 1.8.1. Published 2017-05-18. GHSA-8c56-cpmw-89x7 · CVE-2017-9050
Nokogiri implementation of libxslt lacks integer overflow checks
High 8.8 CWE-787
— Affected: before 1.7.2. Fixed in 1.7.2. Published 2017-04-24. GHSA-pf6m-fxpq-fg8v · CVE-2017-5029
Nokogiri does not forbid namespace nodes in XPointer ranges
Critical 9.8 CWE-119
— Affected: before 1.7.1. Fixed in 1.7.1. Published 2016-09-25. GHSA-fr52-4hqw-p27f · CVE-2016-4658
Heap-based buffer overflow in nokogiri
Moderate CWE-119
— Affected: from 1.6.0 up to 1.6.7.2. Fixed in 1.6.7.2. Published 2015-12-15. GHSA-jxjr-5h69-qw3w · CVE-2015-7499
Find nokogiri across your fleet
Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA,
CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month.
Start free.