Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. loofah
  4. ›
  5. GHSA-5qhf-9phg-95m2

GHSA-5qhf-9phg-95m2: Loofah `allowed_uri?` does not detect `javascript:` URIs split by numeric character references without semicolons

July 21, 2026

Loofah::HTML5::Scrub.allowed_uri? does not correctly reject javascript: or vbscript: URIs when the scheme is split by a numeric character reference that has no trailing semicolon. A browser decodes such references and resolves the URL to an executable javascript: scheme, while allowed_uri? reports it safe.

References

  • github.com/advisories/GHSA-5qhf-9phg-95m2
  • github.com/flavorjones/loofah/commit/f1be9d893b5a8dd79240441a912d8897e74c38c0
  • github.com/flavorjones/loofah/releases/tag/v2.25.2
  • github.com/flavorjones/loofah/security/advisories/GHSA-5qhf-9phg-95m2

Code Behaviors & Features

Detect and mitigate GHSA-5qhf-9phg-95m2 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.2

Fixed versions

  • 2.25.2

Solution

Upgrade to version 2.25.2 or above.

Impact 4.2 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

gem/loofah/GHSA-5qhf-9phg-95m2.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 08 Aug 2026 00:19:14 +0000.