Rack's Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rack | rack | before 2.2.22; 3.0.0.beta1 to before 3.1.20; 3.2.0 to before 3.2.5 | 2.2.22, 3.1.20, 3.2.5 | Patch available | CNA |
| — | rack (RubyGems) | before 2.2.22 | 2.2.22 | Patch available | GHSA-whrj-4476-wvmp |
| — | rack (RubyGems) | 3.0.0.beta1 to before 3.1.20 | 3.1.20 | Patch available | GHSA-whrj-4476-wvmp |
| — | rack (RubyGems) | 3.2.0 to before 3.2.5 | 3.2.5 | Patch available | GHSA-whrj-4476-wvmp |
- rack Vendorrack Affected before 2.2.22; 3.0.0.beta1 to before 3.1.20; 3.2.0 to before 3.2.5 Fixed in 2.2.22, 3.1.20, 3.2.5 Patch available CNA
- rack (RubyGems) Vendor— Affected before 2.2.22 Fixed in 2.2.22 Patch available GHSA-whrj-4476-wvmp
- rack (RubyGems) Vendor— Affected 3.0.0.beta1 to before 3.1.20 Fixed in 3.1.20 Patch available GHSA-whrj-4476-wvmp
- rack (RubyGems) Vendor— Affected 3.2.0 to before 3.2.5 Fixed in 3.2.5 Patch available GHSA-whrj-4476-wvmp
Remediation
- Fix · CNA rack (rack) Fixed in 2.2.22, 3.1.20, 3.2.5
- Fix · GHSA-whrj-4476-wvmp rack (RubyGems) Fixed in 2.2.22 Advisory →
- Fix · GHSA-whrj-4476-wvmp rack (RubyGems) Fixed in 3.1.20 Advisory →
- Fix · GHSA-whrj-4476-wvmp rack (RubyGems) Fixed in 3.2.5 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Logging Subsystem for Red Hat OpenShift | Affected | No fix yet: Fix deferred |
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 7 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
Not affected: 1 product
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25500
- 2026-10-03 Alias added: GHSA-whrj-4476-wvmp
References
More Rack vulnerabilities
- TI-2024-16580 Rack ReDos in content type parsing (2nd degree polynomial) CVSS 3.1HIGH 7.5
- TI-2024-17236 Possible Denial of Service Vulnerability in Rack Header Parsing CVSS 3.1HIGH 7.5
- TI-2024-17231 Possible DoS Vulnerability with Range Header in Rack CVSS 3.1HIGH 7.5
- TI-2023-12254 Uncontrolled resource consumption in https://github.com/rack/rack CVSS 3.1HIGH 7.5
- TI-2025-38165 Rack's multipart parser buffers unbounded per-part headers, enabling DoS (memory exhaustion) CVSS 3.1HIGH 7.5
- TI-2025-38163 Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion) CVSS 3.1HIGH 7.5
Sources
- CVE-2026-25500 · CVE Program
- CVE-2026-25500 · NVD
- FIRST EPSS
- GHSA-whrj-4476-wvmp · GitHub Advisory Database · CC BY 4.0
- CVE-2026-25500 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences