CVE-2026-25500
MEDIUM 5.4CVSS 3.1Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href
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.
- Published
- 18 Feb 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-whrj-4476-wvmp
- Sources
- NVDJSONOSV GHSA-whrj-4476-wvmpJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rack | rackcpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:* |
< 2.2.22 | 2.2.22 |
| NVD | rack | rackcpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:* |
>= 3.0.0, < 3.1.20 | 3.1.20 |
| NVD | rack | rackcpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:* |
>= 3.2.0, < 3.2.5 | 3.2.5 |
| OSV | RubyGems | rack | < 2.2.22 | 2.2.22 |
| OSV | RubyGems | rack | >= 3.0.0.beta1, < 3.1.20 | 3.1.20 |
| OSV | RubyGems | rack | >= 3.2.0, < 3.2.5 | 3.2.5 |
References
- https://github.com/rack/rack/commit/f2f225f297b99fbee3d9f51255d41f601fc40aff · Patch, WEB
- https://github.com/rack/rack/security/advisories/GHSA-whrj-4476-wvmp · Exploit, Mitigation, Vendor Advisory, 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
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 18 Feb 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 17 Feb 2026)