What’s Vulnerable › Vulnerabilities
CVE-2022-45442: Sinatra vulnerable to Reflected File Download attack
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-11-28 · updated 2026-06-17
- Weakness: CWE-494
Description
Sinatra is a domain-specific language for creating web applications in Ruby. An issue was discovered in Sinatra 2.0 before 2.2.3 and 3.0 before 3.0.4. An application is vulnerable to a reflected file download (RFD) attack that sets the Content-Disposition header of a response when the filename is derived from user-supplied input. Version 2.2.3 and 3.0.4 contain patches for this issue.
Affected products
- Debian Linux: 10.0
- sinatra: from 2.0.0 before 2.2.3; from 3.0.0 before 3.0.4 — fixed in 2.2.3, 3.0.4
How to fix
Upgrade to a fixed version: sinatra 2.2.3, 3.0.4. Check the vendor advisory for mitigations.
References
- https://github.com/advisories/GHSA-8x94-hmjh-97hq
- https://github.com/sinatra/sinatra/commit/ea8fc9495a350f7551b39e3025bfcd06f49f363b
- https://github.com/sinatra/sinatra/security/advisories/GHSA-2x8x-jmrp-phxw
- https://lists.debian.org/debian-lts-announce/2023/01/msg00005.html
- https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
- https://github.com/advisories/GHSA-8x94-hmjh-97hq
- https://github.com/sinatra/sinatra/commit/ea8fc9495a350f7551b39e3025bfcd06f49f363b
- https://github.com/sinatra/sinatra/security/advisories/GHSA-2x8x-jmrp-phxw
- https://lists.debian.org/debian-lts-announce/2023/01/msg00005.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00020.html
- https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
Get alerted when CVE-2022-45442 or the next vulnerability affects your stack