Description
Nokogiri is an open source XML and HTML library for Ruby. Nokogiri prior to version 1.13.6 does not type-check all inputs into the XML and HTML4 SAX parsers, allowing specially crafted untrusted inputs to cause illegal memory access errors (segfault) or reads from unrelated memory. Version 1.13.6 contains a patch for this issue. As a workaround, ensure the untrusted input is a `String` by calling `#to_s` or equivalent.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| sparklemotion | nokogiri | < 1.13.6 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ruby-nokogiri | 1.13.7+dfsg-1 | — |
| Debian 13 | ruby-nokogiri | 1.13.7+dfsg-1 | — |
| Debian 12 | ruby-nokogiri | 1.13.7+dfsg-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | ruby-nokogiri | 1.13.1+dfsg-2ubuntu0.1~esm1 | USN-7659-1 |
| Ubuntu Pro 20.04 LTS | ruby-nokogiri | 1.10.7+dfsg1-2ubuntu0.1~esm2 | USN-7659-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite Utils 6 | foreman +1 | 3.3.0.17-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite Capsule 6 | foreman +1 | 3.3.0.17-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite Capsule 6 | python-django +1 | 3.2.14-2.el8pc | RHSA-2022:8506 |
| Red Hat Satellite Capsule 6 | rubygem-nokogiri | 1.13.8-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite Capsule 6 | rubygem-sinatra | 1:2.2.0-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite 6 | candlepin +1 | 4.1.15-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite 6 | foreman +13 | 3.3.0.17-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite 6 | python-django +1 | 3.2.14-2.el8pc | RHSA-2022:8506 |
| Red Hat Satellite 6 | rubygem-git | 1.11.0-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite 6 | rubygem-nokogiri | 1.13.8-1.el8sat | RHSA-2022:8506 |
| Red Hat Satellite 6 | rubygem-rails-html-sanitizer | 1.4.3-2.el8sat | RHSA-2022:8506 |
| Red Hat Satellite 6 | rubygem-sinatra | 1:2.2.0-1.el8sat | RHSA-2022:8506 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP4 | rubygem-nokogiri | 1.8.5-150400.14.3.1 | SUSE-SU-2022:4016-1 |
| SLES 15 SP3 | rubygem-nokogiri | 1.8.5-150000.3.9.1 | SUSE-SU-2022:4015-1 |
| SLES 15 SP2 | rubygem-nokogiri | 1.8.5-150000.3.9.1 | SUSE-SU-2022:4015-1 |
| SLES 15 SP1 | rubygem-nokogiri | 1.8.5-150000.3.9.1 | SUSE-SU-2022:4015-1 |
| SLES 15 | rubygem-nokogiri | 1.8.5-150000.3.9.1 | SUSE-SU-2022:4015-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE OpenStack Cloud Crowbar 9 | rubygem-nokogiri | 1.6.1-5.6.1 | SUSE-SU-2022:3890-1 |
| SUSE OpenStack Cloud Crowbar 8 | rubygem-nokogiri | 1.6.1-5.6.1 | SUSE-SU-2022:3890-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | ruby3.2-rubygem-nokogiri | 1.13.9-1.7 | openSUSE-SU-2024:13165-1 |
| openSUSE Tumbleweed | rubygem-nokogiri | 1.13.6-1.1 | openSUSE-SU-2026:10356-1, openSUSE-SU-2025:14697-1, openSUSE-SU-2024:14174-1 |
| openSUSE Leap 15.4 | rubygem-nokogiri | 1.8.5-150400.14.3.1 | SUSE-SU-2022:4016-1 |
| openSUSE Leap 15.3 | rubygem-nokogiri | 1.8.5-150000.3.9.1 | SUSE-SU-2022:4015-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.23 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.22 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.21 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.20 | ruby-nokogiri | 1.13.6-r0 | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.18 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.17 | ruby-nokogiri | 1.13.6-r0 | — |
| Alpine v3.16 | ruby-nokogiri | 1.13.6-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | nokogiri | < 1.13.6 | 1.13.6 | GHSA-xh29-r2w5-wx8m |
Advisories 12
- RHSA-2022:8506 Red Hat Security Advisory: Satellite 6.12 Release Red Hat Security Advisories (RHSA) · Oct 13, 2026
- USN-7659-1 ruby-nokogiri vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- openSUSE-SU-2026:10356-1 ruby4.0-rubygem-nokogiri-1.18.9-1.4 on GA media SUSE / openSUSE Security Updates · Mar 14, 2026
- openSUSE-SU-2025:14697-1 ruby3.4-rubygem-nokogiri-1.18.2-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:13165-1 ruby3.2-rubygem-nokogiri-1.13.9-1.7 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:4015-1 Security update for rubygem-nokogiri SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:14174-1 ruby3.3-rubygem-nokogiri-1.15.5-1.5 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:4016-1 Security update for rubygem-nokogiri SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:3890-1 Security update for rubygem-nokogiri SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:12085-1 ruby3.1-rubygem-nokogiri-1.13.6-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2022-2313 Apple macOS: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 31, 2024
- WID-SEC-2022-1935 Microsoft GitHub Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 2, 2023
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
- https://github.com/sparklemotion/nokogiri/commit/83cc451c3f29df397caa890afc3b714eae6ab8f7
- https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
- https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri