Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. loofah
  4. ›
  5. GHSA-2j22-pr5w-6gq8

GHSA-2j22-pr5w-6gq8: Loofah has improper detection of disallowed URIs via `allowed_uri?`

March 26, 2026

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).

References

  • github.com/advisories/GHSA-2j22-pr5w-6gq8
  • github.com/flavorjones/loofah
  • github.com/flavorjones/loofah/commit/f4ebc9c5193dde759a57541062e490e86fc7c068
  • github.com/flavorjones/loofah/releases/tag/v2.25.1
  • github.com/flavorjones/loofah/security/advisories/GHSA-46fp-8f5p-pf2m
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-46fp-8f5p-pf2m.yml

Code Behaviors & Features

Detect and mitigate GHSA-2j22-pr5w-6gq8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.25.0 before 2.25.1, version 2.25.0

Fixed versions

  • 2.25.1

Solution

Upgrade to version 2.25.1 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

gem/loofah/GHSA-2j22-pr5w-6gq8.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:29 +0000.