Vulnerability · Published Feb 18, 2026 · Assigned by GitHub_M

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

Medium 5.4

In plain English

A medium-severity cross-site scripting in rack from rack. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.4Medium
Exploit odds (30 days)0.3%top 80.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12ruby-rack2.2.22-0+deb12u1DEBIAN-CVE-2026-25500
Debian:12ruby-rack2.2.22-0+deb12u1DSA-6180-1
Debian:13ruby-rack3.1.20-0+deb13u1DEBIAN-CVE-2026-25500
Debian:13ruby-rack3.1.20-0+deb13u1DSA-6180-1
Debian:14ruby-rack3.2.5-1DEBIAN-CVE-2026-25500
RubyGemsrack3.1.20GHSA-whrj-4476-wvmp
RubyGemsrack2.2.22GHSA-whrj-4476-wvmp
RubyGemsrack3.2.5GHSA-whrj-4476-wvmp
Ubuntu:24.04:LTSruby-rack2.2.7-1ubuntu0.6UBUNTU-CVE-2026-25500
Ubuntu:25.10ruby-rack3.1.16-0.1ubuntu0.2UBUNTU-CVE-2026-25500
Ubuntu:26.04:LTSruby-rack3.2.4-1ubuntu1UBUNTU-CVE-2026-25500
Ubuntu:26.10ruby-rack3.2.4-1ubuntu1UBUNTU-CVE-2026-25500

Affected products (as reported)

VendorProductVersions
rack rack < 2.2.22>= 3.0.0.beta1, < 3.1.20>= 3.2.0, < 3.2.5

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

References