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

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 21% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-17T18:46:35.000Z
- Modified: 2026-09-10T03:50:36.160Z
- Also known as: GHSA-whrj-4476-wvmp
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- rack rack: < 2.2.22; >= 3.0.0.beta1, < 3.1.20; >= 3.2.0, < 3.2.5; before 2.2.22; from 3.0.0 before 3.1.20; from 3.2.0 before 3.2.5
- rack (RubyGems): before 2.2.22; from 3.0.0.beta1 before 3.1.20; from 3.2.0 before 3.2.5

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/rack/rack/security/advisories/GHSA-whrj-4476-wvmp> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/rack/rack/commit/f2f225f297b99fbee3d9f51255d41f601fc40aff> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25500> (advisory)
- <https://github.com/rack/rack> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-25500.yml> (web)

## Sources

- CVE List: [CVE-2026-25500](https://www.cve.org/CVERecord?id=CVE-2026-25500), CVE Terms of Use, modified 2026-02-18
- GitHub Advisory Database: [GHSA-whrj-4476-wvmp](https://github.com/advisories/GHSA-whrj-4476-wvmp), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-25500](https://nvd.nist.gov/vuln/detail/CVE-2026-25500), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25500 · Whole record: https://cve.day/CVE-2026-25500.json · Rebuilt by cve.day 2026-11-25T22:59:14.014Z
