Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. rack
  4. ›
  5. CVE-2026-25500

CVE-2026-25500: Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href

February 17, 2026 (updated February 24, 2026)

Rack::Directory generates an HTML directory index where each file entry is rendered as a clickable link. If a file exists on disk whose basename begins with the javascript: scheme (e.g. javascript:alert(1)), the generated index includes an anchor whose href attribute is exactly javascript:alert(1). Clicking this entry executes arbitrary JavaScript in the context of the hosting application.

This results in a client-side XSS condition in directory listings generated by Rack::Directory.

References

  • github.com/advisories/GHSA-whrj-4476-wvmp
  • github.com/rack/rack
  • github.com/rack/rack/commit/f2f225f297b99fbee3d9f51255d41f601fc40aff
  • github.com/rack/rack/security/advisories/GHSA-whrj-4476-wvmp
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-25500.yml
  • nvd.nist.gov/vuln/detail/CVE-2026-25500

Code Behaviors & Features

Detect and mitigate CVE-2026-25500 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 3.0.0.beta1 before 3.1.20, all versions before 2.2.22, all versions starting from 3.2.0 before 3.2.5

Fixed versions

  • 2.2.22
  • 3.1.20
  • 3.2.5

Solution

Upgrade to versions 2.2.22, 3.1.20, 3.2.5 or above.

Impact 5.4 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

gem/rack/CVE-2026-25500.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Thu, 26 Feb 2026 12:18:28 +0000.