CVE-2022-45442Sinatra vulnerable to Reflected File Download attack
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.
What to do
Fixed builds are available from AlmaLinux, Debian, PyPI, Red Hat, Rocky Linux, RubyGems, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | ruby-sinatra | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | ruby-sinatra | Fixed | 2.0.8.1-2+deb11u1build0.22.04.1 | UBUNTU-CVE-2022-45442 |
| Ubuntu 18.04 | ruby-sinatra | Fix pending | 1.4.8-1ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2022-45442 |
| Ubuntu 16.04 | ruby-sinatra | Fix pending | 1.4.7-3ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2022-45442 |
| Ubuntu 14.04 | ruby-sinatra | Fix pending | ||
| Debian 14 | ruby-sinatra | Fixed | 3.0.5-2 | DEBIAN-CVE-2022-45442 |
| Debian 13 | ruby-sinatra | Fixed | 3.0.5-2 | DEBIAN-CVE-2022-45442 |
| Debian 12 | ruby-sinatra | Fixed | 3.0.5-2 | DEBIAN-CVE-2022-45442 |
| Red Hat Enterprise Linux 9 | pcs | Fixed | 0:0.11.3-4.el9_1.2 | RHSA-2023:0974 |
| Red Hat Enterprise Linux 9 | pcs-snmp | Fixed | 0:0.11.3-4.el9_1.2 | RHSA-2023:0974 |
| Red Hat Enterprise Linux 8 | pcs | Fixed | 0:0.10.14-5.el8_7.2 | RHSA-2023:0855 |
| Red Hat Enterprise Linux 8 | pcs-snmp | Fixed | 0:0.10.14-5.el8_7.2 | RHSA-2023:0855 |
| AlmaLinux 9 | pcs | Fixed | 0.11.3-4.el9_1.2 | ALSA-2023:0974 |
| AlmaLinux 9 | pcs-snmp | Fixed | 0.11.3-4.el9_1.2 | ALSA-2023:0974 |
| AlmaLinux 8 | pcs | Fixed | 0.10.14-5.el8_7.2.alma | ALSA-2023:0855 |
| AlmaLinux 8 | pcs-snmp | Fixed | 0.10.14-5.el8_7.2.alma | ALSA-2023:0855 |
| Rocky Linux 8 | pcs | Fixed | 0:0.10.14-5.el8_7.2 | RLSA-2023:0855 |
| PyPI library | django | Fixed | 3.2.15 | GHSA-8x94-hmjh-97hq |
| RubyGems library | sinatra | Fixed | 3.0.4 | GHSA-2x8x-jmrp-phxw |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- sinatra: affected: >= 3.0, < 3.0.4, >= 2.0, < 2.2.3
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
- https://lists.debian.org/debian-lts-announce/2023/01/msg00005.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.