Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:gem/loofah@1.1.0
purl pkg:gem/loofah@1.1.0
Next non-vulnerable version None.
Latest non-vulnerable version None.
Risk 4.0
Vulnerabilities affecting this package (6)
Vulnerability Summary Fixed by
VCID-ab24-w4sg-bbax
Aliases:
CVE-2019-15587
GHSA-c3gv-9cxf-6f57
Loofah Allows Cross-site Scripting In the Loofah gem for Ruby through v2.3.0, unsanitized JavaScript may occur in sanitized output when a crafted SVG element is republished.
2.3.1
Affected by 4 other vulnerabilities.
VCID-amsh-qpt1-9qb7
Aliases:
GHSA-46fp-8f5p-pf2m
Improper detection of disallowed URIs by Loofah `allowed_uri?` ## Summary `Loofah::HTML5::Scrub.allowed_uri?` does not correctly reject `javascript:` URIs when the scheme is split by HTML entity-encoded control characters such as `
` (carriage return), `
` (line feed), or `	` (tab). ## Details The `allowed_uri?` method strips literal control characters before decoding HTML entities. Payloads like `java
script:alert(1)` survive the control character strip, then `
` is decoded to a carriage return, producing `java\rscript:alert(1)`. Note that the Loofah sanitizer's default `sanitize()` path is **not affected** because Nokogiri decodes HTML entities during parsing before Loofah evaluates the URI protocol. This issue only affects direct callers of the `allowed_uri?` string-level helper when passing HTML-encoded strings. ## Impact Applications that call `Loofah::HTML5::Scrub.allowed_uri?` to validate user-controlled URLs and then render approved URLs into `href` or other browser-interpreted URI attributes may be vulnerable to cross-site scripting (XSS). This only affects Loofah `2.25.0`. ## Mitigation Upgrade to Loofah >= `2.25.1`. ## Credit Responsibly reported by HackOne user `@smlee`.
2.25.1
Affected by 1 other vulnerability.
VCID-paw4-xkmu-w7eb
Aliases:
CVE-2018-16468
GHSA-g4xq-jx4w-4cjv
Cross-site Scripting In the Loofah gem for Ruby, unsanitized JavaScript may occur in sanitized output when a crafted SVG element is republished.
2.2.3
Affected by 5 other vulnerabilities.
VCID-q52h-9tcw-zfab
Aliases:
CVE-2022-23514
GHSA-486f-hjj9-9vhh
GMS-2022-8289
Inefficient Regular Expression Complexity in Loofah ## Summary 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. ## Mitigation Upgrade to Loofah `>= 2.19.1`. ## Severity The Loofah maintainers have evaluated this as [High Severity 7.5 (CVSS3.1)](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). ## References - [CWE - CWE-1333: Inefficient Regular Expression Complexity (4.9)](https://cwe.mitre.org/data/definitions/1333.html) - https://hackerone.com/reports/1684163 ## Credit This vulnerability was responsibly reported by @ooooooo-q (https://github.com/ooooooo-q).
2.19.1
Affected by 1 other vulnerability.
VCID-sqa5-8yrd-qyfz
Aliases:
CVE-2018-8048
GHSA-x7rv-cr6v-4vm4
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') In the Loofah gem for Ruby, denylisted HTML attributes may occur in sanitized output by republishing a crafted HTML fragment.
2.2.1
Affected by 6 other vulnerabilities.
VCID-wxfr-bs81-augc
Aliases:
CVE-2022-23518
GHSA-mcvf-2q2m-x72m
GMS-2022-8300
Improper neutralization of data URIs may allow XSS in rails-html-sanitizer ## Summary rails-html-sanitizer `>= 1.0.3, < 1.4.4` is vulnerable to cross-site scripting via data URIs when used in combination with Loofah `>= 2.1.0`. ## Mitigation Upgrade to rails-html-sanitizer `>= 1.4.4`. ## Severity The maintainers have evaluated this as [Medium Severity 6.1](https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N). ## References - [CWE - CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (4.9)](https://cwe.mitre.org/data/definitions/79.html) - [SVG MIME Type (image/svg+xml) is misleading to developers · Issue #266 · w3c/svgwg](https://github.com/w3c/svgwg/issues/266) - https://github.com/rails/rails-html-sanitizer/issues/135 - https://hackerone.com/reports/1694173 ## Credit This vulnerability was independently reported by Maciej Piechota (@haqpl) and Mrinmoy Das (@goromlagche).
2.1.1
Affected by 6 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-16T22:18:07.778599+00:00 GitLab Importer Affected by VCID-wxfr-bs81-augc https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23518.yml 38.4.0
2026-04-16T22:18:05.781501+00:00 GitLab Importer Affected by VCID-q52h-9tcw-zfab https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23514.yml 38.4.0
2026-04-16T20:58:12.350400+00:00 GitLab Importer Affected by VCID-ab24-w4sg-bbax https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2019-15587.yml 38.4.0
2026-04-16T20:49:29.876332+00:00 GitLab Importer Affected by VCID-paw4-xkmu-w7eb https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-16468.yml 38.4.0
2026-04-16T20:42:20.847393+00:00 GitLab Importer Affected by VCID-sqa5-8yrd-qyfz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-8048.yml 38.4.0
2026-04-16T17:41:47.508550+00:00 Ruby Importer Affected by VCID-amsh-qpt1-9qb7 https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-46fp-8f5p-pf2m.yml 38.4.0
2026-04-16T01:20:36.231294+00:00 GHSA Importer Affected by VCID-sqa5-8yrd-qyfz https://github.com/advisories/GHSA-x7rv-cr6v-4vm4 38.4.0
2026-04-11T23:35:39.489406+00:00 GitLab Importer Affected by VCID-wxfr-bs81-augc https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23518.yml 38.3.0
2026-04-11T23:35:37.302581+00:00 GitLab Importer Affected by VCID-q52h-9tcw-zfab https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23514.yml 38.3.0
2026-04-11T22:09:19.667168+00:00 GitLab Importer Affected by VCID-ab24-w4sg-bbax https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2019-15587.yml 38.3.0
2026-04-11T22:00:34.740462+00:00 GitLab Importer Affected by VCID-paw4-xkmu-w7eb https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-16468.yml 38.3.0
2026-04-11T21:52:55.920060+00:00 GitLab Importer Affected by VCID-sqa5-8yrd-qyfz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-8048.yml 38.3.0
2026-04-11T21:39:55.216165+00:00 Ruby Importer Affected by VCID-amsh-qpt1-9qb7 https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-46fp-8f5p-pf2m.yml 38.3.0
2026-04-11T12:48:51.537991+00:00 GHSA Importer Affected by VCID-sqa5-8yrd-qyfz https://github.com/advisories/GHSA-x7rv-cr6v-4vm4 38.3.0
2026-04-02T23:40:15.338783+00:00 GitLab Importer Affected by VCID-wxfr-bs81-augc https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23518.yml 38.1.0
2026-04-02T23:40:13.934124+00:00 GitLab Importer Affected by VCID-q52h-9tcw-zfab https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23514.yml 38.1.0
2026-04-02T22:21:57.636781+00:00 GitLab Importer Affected by VCID-ab24-w4sg-bbax https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2019-15587.yml 38.1.0
2026-04-02T22:13:38.459063+00:00 GitLab Importer Affected by VCID-paw4-xkmu-w7eb https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-16468.yml 38.1.0
2026-04-02T22:06:42.652039+00:00 GitLab Importer Affected by VCID-sqa5-8yrd-qyfz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-8048.yml 38.1.0
2026-04-02T19:37:13.464549+00:00 Ruby Importer Affected by VCID-amsh-qpt1-9qb7 https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-46fp-8f5p-pf2m.yml 38.1.0
2026-04-02T13:43:26.595240+00:00 GHSA Importer Affected by VCID-sqa5-8yrd-qyfz https://github.com/advisories/GHSA-x7rv-cr6v-4vm4 38.1.0
2026-04-01T18:02:46.433891+00:00 GitLab Importer Affected by VCID-wxfr-bs81-augc https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23518.yml 38.0.0
2026-04-01T18:02:44.978800+00:00 GitLab Importer Affected by VCID-q52h-9tcw-zfab https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2022-23514.yml 38.0.0
2026-04-01T16:39:43.012530+00:00 GitLab Importer Affected by VCID-ab24-w4sg-bbax https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2019-15587.yml 38.0.0
2026-04-01T16:31:02.784417+00:00 GitLab Importer Affected by VCID-paw4-xkmu-w7eb https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-16468.yml 38.0.0
2026-04-01T16:23:43.661402+00:00 GitLab Importer Affected by VCID-sqa5-8yrd-qyfz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/gem/loofah/CVE-2018-8048.yml 38.0.0
2026-04-01T15:55:04.361916+00:00 Ruby Importer Affected by VCID-amsh-qpt1-9qb7 https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-46fp-8f5p-pf2m.yml 38.0.0