High
Inefficient Regular Expression Complexity in Nokogiri
Type: advisorySources: OSV
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-24836
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 02:14 UTC · Revision 1
Source evidence
Inefficient Regular Expression Complexity in Nokogiri
core-osv · Original sourcePublished 11 Apr 2022, 00:00 UTC
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.
osv:CVE-2022-24836
Complete source record
{
"id": "4fb457bc55818c9bcb44f5c86ed6c78974fd9806a1a954cd101721b9137cbc64",
"url": "https://osv.dev/vulnerability/CVE-2022-24836",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Inefficient Regular Expression Complexity in Nokogiri",
"summary": "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.",
"evidence": "osv:CVE-2022-24836",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2022-24836",
"aliases": [
"CVE-2022-24836",
"GHSA-crjr-9rc5-ghw8"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/sparklemotion/nokogiri",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "4e2c4b2571dc58af294f61e6fd923f0d1698c036"
},
{
"fixed": "e444525ef1634b675cd1cf52d39f4320ef0aecfd"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.13.4"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "e444525ef1634b675cd1cf52d39f4320ef0aecfd"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.13.3",
"v1.13.2",
"v1.13.1",
"v1.13.0",
"v1.12.3",
"v1.12.2",
"v1.12.1",
"v1.12.0",
"v1.12.0.rc1",
"v1.11.3",
"v1.11.2",
"v1.11.1",
"v1.11.0",
"v1.11.0.rc4",
"v1.11.0.rc3",
"v1.11.0.rc2",
"v1.11.0.rc1",
"v1.10.3",
"v1.10.2",
"v1.8.5",
"v1.10.1",
"v1.10.0",
"v1.10.0.rc1",
"v1.9.1",
"v1.9.0",
"v1.9.0.rc1",
"v1.8.4",
"v1.8.3",
"v1.8.2",
"v1.8.1",
"v1.8.0",
"v1.7.0.1",
"v1.7.0",
"v1.6.8",
"v1.6.8.rc3",
"v1.6.8.rc2",
"v1.6.8.rc1",
"v1.6.7.rc4",
"v1.6.6.2",
"v1.6.7.rc3",
"v1.6.7.rc2",
"v1.6.7.rc1",
"1.7.0.1-linux-binary1",
"v1.6.6.1",
"v1.6.6",
"v1.6.5",
"v1.6.4",
"v1.6.3.1",
"v1.6.3",
"v1.6.3.rc3",
"v1.6.3.rc2",
"v1.6.3.rc1",
"v1.6.2.1",
"v1.6.2",
"v1.6.2.rc3",
"v1.6.2.rc1",
"v1.6.2.beta.1",
"v1.6.0",
"v1.5.9",
"v1.6.0.rc1",
"v1.5.8",
"v1.5.7",
"v1.5.7.rc3",
"v1.5.7.rc2",
"v1.5.7.rc1",
"v1.5.6",
"v1.5.6.rc2",
"v1.5.5.rc2",
"v1.5.5.rc1",
"v1.5.4.rc3",
"v1.5.4.rc2",
"v1.5.4.rc1",
"v1.5.3",
"v1.5.3.rc6",
"v1.5.3.rc5",
"v1.5.3.rc4",
"v1.5.3.rc3",
"v1.5.3.rc1",
"v1.5.2",
"v1.5.1",
"v1.5.1.rc1",
"v1.5.0",
"v1.5.0.beta.3",
"v1.5.0.beta.4",
"REL_1.5.0.beta.2",
"REL_1.5.0.beta.1",
"REL_1.0.7",
"REL_1.0.6",
"REL_1.0.5",
"REL_1.0.4",
"REL_1.0.3",
"REL_1.0.2",
"REL_1.0.1",
"REL_1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24836.json"
}
}
],
"modified": "2026-10-28T02:30:25.294573332Z",
"provider": "osv",
"references": [
"https://lists.debian.org/debian-lts-announce/2024/09/msg00010.html",
"https://support.apple.com/kb/HT213532",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24836.json",
"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-crjr-9rc5-ghw8",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6DHCOWMA5PQTIQIMDENA7R2Y5BDYAIYM/",
"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://nvd.nist.gov/vuln/detail/CVE-2022-24836",
"https://security.gentoo.org/glsa/202208-29",
"https://github.com/sparklemotion/nokogiri/commit/e444525ef1634b675cd1cf52d39f4320ef0aecfd",
"https://lists.debian.org/debian-lts-announce/2022/05/msg00013.html",
"https://lists.debian.org/debian-lts-announce/2022/10/msg00018.html"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1333",
"CWE-400"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24836.json"
}
},
"related_cves": [
{
"value": "CVE-2022-24836",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 491821,
"published_at": "2022-04-11T00:00:00+00:00"
}