Vulnerability in Sinatra
CVE-2022-45442
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.007, 53.5th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
- Sinatra — versions >= 3.0, < 3.0.4, >= 2.0, < 2.2.3
- Sinatrarb Sinatra
- Debian Linux — versions 10.0
Weakness classification (CWE)
Public exploits and proof-of-concept code
1 public repository with exploit or proof-of-concept code for this CVE:
- boost-legal/refile (last pushed 2026-06-30): Private fork of refile/refile (pinned at c4ac577c) with sinatra ceiling raised to < 4.0 for CVE-2022-45442. See sc-47428.
Also mentioned in 2 other repositories (ARPSyndicate/cvemon, motoyasu-saburi/reported_vulnerability). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/sinatra/sinatra/security/advisories/GHSA-2x8x-jmrp-phxw (Third Party Advisory)
- github.com/sinatra/sinatra/commit/ea8fc9495a350f7551b39e3025bfcd06f49f363b (Patch, Third Party Advisory)
- github.com/advisories/GHSA-8x94-hmjh-97hq (Not Applicable)
- www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New… (Exploit, Third Party Advisory)
- [debian-lts-announce] 20230110 [SECURITY] [DLA 3264-1] ruby-sinatra security update (mailing-list, Mailing List, Third Party Advisory)
- lists.debian.org/debian-lts-announce/2024/09/msg00020.html
This CVE has public exploit evidence. See the latest CVEs with public exploits.