CVE-2022-23514
rubygem-loofah: inefficient regular expression leading to denial of service
Overview
Description
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah < 2.19.1 contains an inefficient regular expression that is susceptible to excessive backtracking when attempting to sanitize certain SVG attributes. This may lead to a denial of service through CPU resource consumption. This issue is patched in version 2.19.1.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-1333
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| RubyGems | loofah | <2.19.1 | 2.19.1 |
Open a package to see all its vulnerabilities.
Operating systems · 14 fixes
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | tfm-rubygem-loofah | affected |
SUSE Linux Enterprise 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | ruby2-5-rubygem-loofah | 2.2.2-150000.4.9.1 | SUSE-SU-2023:1657-1 |
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | ruby-loofah | 2.2.3-1+deb10u2 |
| 11 | ruby-loofah | 2.7.0+dfsg-1+deb11u1 |
| 12 | ruby-loofah | 2.19.1-1 |
| 13 | ruby-loofah | 2.19.1-1 |
| 14 | ruby-loofah | 2.19.1-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| ruby-loofah | 2.19.1-1 |
openSUSE 1 release · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | ruby3-1-rubygem-loofah +1 | 2.19.1-1.1 | openSUSE-SU-2024:12768-1 |
| Tumbleweed | ruby3-3-rubygem-loofah | 2.22.0-1.5 | openSUSE-SU-2024:14171-1 |
| Tumbleweed | ruby3-4-rubygem-loofah | 2.23.1-1.3 | openSUSE-SU-2025:15120-1 |
| Tumbleweed | ruby4-0-rubygem-loofah | 2.23.1-1.5 | openSUSE-SU-2026:10353-1 |
seal Red Hat 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | python-jinja2 +1 | 2.7.2-4.el7+sp999 |
| 8 | libsolv +1 | 0.7.20-6.el8+sp999 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-23514
- cwe.mitre.org https://cwe.mitre.org/data/definitions/1333.html
- github.com https://github.com/flavorjones/loofah
- github.com https://github.com/flavorjones/loofah/commit/a6e0a1ab90675a17b1b2be189129d94139e4b143
- github.com https://github.com/flavorjones/loofah/security/advisories/GHSA-486f-hjj9-9vhh
- github.com https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/CVE-2022-23514.yml
- github.com https://github.com/rubysec/ruby-advisory-db/tree/master/gems/loofah/CVE-2022-23514.yml
- hackerone.com https://hackerone.com/reports/1684163
- lists.debian.org https://lists.debian.org/debian-lts-announce/2023/09/msg00011.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2024/09/msg00044.html
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.