# CVE-2022-24836: Inefficient Regular Expression Complexity in Nokogiri

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.52%, higher than 89% of CVEs (2026-12-01)
- Published: 2022-04-11T00:00:00.000Z
- Modified: 2026-06-17T04:32:37.603Z
- Also known as: GHSA-crjr-9rc5-ghw8
- Weaknesses: CWE-400, CWE-1333
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- sparklemotion nokogiri: < 1.13.4
- nokogiri (RubyGems): before 1.13.4
- nokogiri nokogiri: before 1.13.4
- fedoraproject fedora: 34; 35; 36
- debian debian_linux: 9.0; 10.0
- apple macos: from 13.0 before 13.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-crjr-9rc5-ghw8> (third-party-advisory, web)
- <https://github.com/sparklemotion/nokogiri/commit/e444525ef1634b675cd1cf52d39f4320ef0aecfd> (patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OUPLBUZVM4WPFSXBEP2JS3R6LMKRTLFC/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XMDCWRQXJQ3TFSETPCEFMQ6RR6ME5UA3/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6DHCOWMA5PQTIQIMDENA7R2Y5BDYAIYM/> (vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/05/msg00013.html> (mailing-list, third-party-advisory, web)
- <https://security.gentoo.org/glsa/202208-29> (third-party-advisory, vendor-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2022/10/msg00018.html> (mailing-list, third-party-advisory, web)
- <https://support.apple.com/kb/HT213532> (third-party-advisory, web)
- <http://seclists.org/fulldisclosure/2022/Dec/23> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00010.html>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-24836> (advisory)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2022-24836.yml> (web)
- <https://github.com/sparklemotion/nokogiri> (package)
- <https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.4> (web)
- <https://groups.google.com/g/ruby-security-ann/c/vX7qSjsvWis/m/TJWN4oOKBwAJ?utm_medium=email&utm_source=footer> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DHCOWMA5PQTIQIMDENA7R2Y5BDYAIYM> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OUPLBUZVM4WPFSXBEP2JS3R6LMKRTLFC> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XMDCWRQXJQ3TFSETPCEFMQ6RR6ME5UA3> (web)

## Sources

- CVE List: [CVE-2022-24836](https://www.cve.org/CVERecord?id=CVE-2022-24836), CVE Terms of Use, modified 2024-09-03
- GitHub Advisory Database: [GHSA-crjr-9rc5-ghw8](https://github.com/advisories/GHSA-crjr-9rc5-ghw8), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2022-24836](https://nvd.nist.gov/vuln/detail/CVE-2022-24836), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-24836 · Whole record: https://cve.day/CVE-2022-24836.json · Rebuilt by cve.day 2026-11-25T22:58:10.546Z
