CVE-2026-25500

Rack's Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href

Published Feb 18, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
Rack is a modular Ruby web server interface. Prior to versions 2.2.22, 3.1.20, and 3.2.5, `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 starts with the `javascript:` scheme (e.g. `javascript:alert(1)`), the generated index contains an anchor whose `href` is exactly `javascript:alert(1)`. Clicking the entry executes JavaScript in the browser (demonstrated with `alert(1)`). Versions 2.2.22, 3.1.20, and 3.2.5 fix the issue.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4505-1 ruby-rack security update
Debian DSA Debian DSA DSA-6180-1 ruby-rack security update
Github GHSA Github GHSA GHSA-whrj-4476-wvmp Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href
Ubuntu USN Ubuntu USN USN-8066-1 Rack vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*
Type Values Removed Values Added
First Time appeared Rack
Rack rack
Vendors & Products Rack
Rack rack
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Rack is a modular Ruby web server interface. Prior to versions 2.2.22, 3.1.20, and 3.2.5, `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 starts with the `javascript:` scheme (e.g. `javascript:alert(1)`), the generated index contains an anchor whose `href` is exactly `javascript:alert(1)`. Clicking the entry executes JavaScript in the browser (demonstrated with `alert(1)`). Versions 2.2.22, 3.1.20, and 3.2.5 fix the issue.
Title Rack's Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 18, 2026, 7:42 PM
Reserved
Feb 2, 2026, 6:21 PM
Status
Analyzed
Published
Feb 18, 2026, 8:18 PM
Modified
Jun 17, 2026, 10:24 AM
Severity
Moderate
Public date
Feb 18, 2026, 6:59 PM