Vulnerability · Published Nov 28, 2022 · Assigned by GitHub_M
CVE-2022-45442Sinatra vulnerable to Reflected File Download attack
High 8.8
In plain English
A high-severity security flaw in sinatra from sinatra. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | pcs | 0.10.14-5.el8_7.2.alma | ALSA-2023:0855 |
| AlmaLinux:9 | pcs | 0.11.3-4.el9_1.2 | ALSA-2023:0974 |
| AlmaLinux:8 | pcs-snmp | 0.10.14-5.el8_7.2.alma | ALSA-2023:0855 |
| AlmaLinux:9 | pcs-snmp | 0.11.3-4.el9_1.2 | ALSA-2023:0974 |
| Debian:12 | ruby-sinatra | 3.0.5-2 | DEBIAN-CVE-2022-45442 |
| Debian:13 | ruby-sinatra | 3.0.5-2 | DEBIAN-CVE-2022-45442 |
| Debian:14 | ruby-sinatra | 3.0.5-2 | DEBIAN-CVE-2022-45442 |
| Rocky Linux:8 | pcs | 0:0.10.14-5.el8_7.2 | RLSA-2023:0855 |
| RubyGems | sinatra | 3.0.4 | GHSA-2x8x-jmrp-phxw |
| RubyGems | sinatra | 2.2.3 | GHSA-2x8x-jmrp-phxw |
| Ubuntu:22.04:LTS | ruby-sinatra | 2.0.8.1-2+deb11u1build0.22.04.1 | USN-7664-1 |
| Ubuntu:22.04:LTS | ruby-sinatra | 2.0.8.1-2+deb11u1build0.22.04.1 | UBUNTU-CVE-2022-45442 |
Affected products (as reported)
Weakness: CWE-494 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/sinatra/sinatra/security/advisories/GHSA-2x8x-jmrp-phxw
- https://github.com/sinatra/sinatra/commit/ea8fc9495a350f7551b39e3025bfcd06f49f363b
- https://github.com/advisories/GHSA-8x94-hmjh-97hq
- https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
- [debian-lts-announce] 20230110 [SECURITY] [DLA 3264-1] ruby-sinatra security update mailing-list
- https://lists.debian.org/debian-lts-announce/2024/09/msg00020.html