CVE-2022-24836Inefficient Regular Expression Complexity in Nokogiri
Nokogiri is an open source XML and HTML library for Ruby. Nokogiri `< v1.13.4` contains an inefficient regular expression that is susceptible to excessive backtracking when attempting to detect encoding in HTML documents. Users are advised to upgrade to Nokogiri `>= 1.13.4`. There are no known workarounds for this issue.
What to do
Fixed builds are available from Alpine, Debian, Rocky Linux, RubyGems: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | ruby-nokogiri | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | ruby-nokogiri | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | ruby-nokogiri | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | ruby-nokogiri | Fix pending | UBUNTU-CVE-2022-24836 | |
| Ubuntu 20.04 | ruby-nokogiri | Fix pending | UBUNTU-CVE-2022-24836 | |
| Ubuntu 18.04 | ruby-nokogiri | Fix pending | UBUNTU-CVE-2022-24836 | |
| Ubuntu 16.04 | ruby-nokogiri | Fix pending | UBUNTU-CVE-2022-24836 | |
| Ubuntu 14.04 | ruby-nokogiri | Fix pending | UBUNTU-CVE-2022-24836 | |
| Debian 14 | ruby-nokogiri | Fixed | 1.13.5+dfsg-1 | DEBIAN-CVE-2022-24836 |
| Debian 13 | ruby-nokogiri | Fixed | 1.13.5+dfsg-1 | DEBIAN-CVE-2022-24836 |
| Debian 12 | ruby-nokogiri | Fixed | 1.13.5+dfsg-1 | DEBIAN-CVE-2022-24836 |
| Rocky Linux 8 | libdb | Fixed | 0:5.3.28-42.el8_4 | RLSA-2022:8506 |
| Alpine Linux 3.24 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.23 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.22 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.21 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.20 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.19 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.18 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.17 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| Alpine Linux 3.16 | ruby-nokogiri | Fixed | 1.13.4-r0 | ALPINE-CVE-2022-24836 |
| RubyGems library | nokogiri | Fixed | 1.13.4 | GHSA-crjr-9rc5-ghw8 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- sparklemotion nokogiri: affected: < 1.13.4
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://security.gentoo.org/glsa/202208-29 (vendor-advisory)
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-crjr-9rc5-ghw8
- https://github.com/sparklemotion/nokogiri/commit/e444525ef1634b675cd1cf52d39f4320ef0aecfd
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OUPLBUZVM4WPFSXBEP2JS3R6LMKRTLFC/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XMDCWRQXJQ3TFSETPCEFMQ6RR6ME5UA3/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6DHCOWMA5PQTIQIMDENA7R2Y5BDYAIYM/
- https://lists.debian.org/debian-lts-announce/2022/05/msg00013.html
- https://security.gentoo.org/glsa/202208-29
- https://lists.debian.org/debian-lts-announce/2022/10/msg00018.html
- https://support.apple.com/kb/HT213532
- http://seclists.org/fulldisclosure/2022/Dec/23
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.