Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2022-45442 EUVD-2022-7200GHSA-2x8x-jmrp-phxw

Sinatra vulnerable to Reflected File Download attack

Published Nov 28, 2022 · Updated Nov 4, 2025 · Assigned by GitHub_M

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

VendorProductAffectedFixed
sinatra sinatra >= 3.0, < 3.0.4, >= 2.0, < 2.2.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby-sinatra 3.0.5-2 —
Debian 13 ruby-sinatra 3.0.5-2 —
Debian 12 ruby-sinatra 3.0.5-2 —
Debian 11 ruby-sinatra 2.0.8.1-2+deb11u1 DLA-3877-1
Debian 10 ruby-sinatra 2.0.5-4+deb10u2 DLA-3264-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS ruby-sinatra 2.0.8.1-2+deb11u1build0.22.04.1 USN-7664-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS ruby-sinatra 2.0.8.1-1ubuntu0.1~esm2 USN-7664-1
Ubuntu Pro 18.04 LTS ruby-sinatra 1.4.8-1ubuntu0.1~esm2 USN-7664-1
Ubuntu Pro 16.04 LTS ruby-sinatra 1.4.7-3ubuntu0.1~esm2 USN-7664-1
ReleasePackageFixed inAdvisory
RHEL 9 pcs +1 0.11.3-4.el9_1.2 RHSA-2023:0974
RHEL 8 pcs +1 0.10.14-5.el8_7.2 RHSA-2023:0855
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.0 EUS pcs +1 0.11.1-10.el9_0.3 RHSA-2023:0527
RHEL 8.6 EUS pcs +1 0.10.12-6.el8_6.3 RHSA-2023:0427
RHEL 8.4 EUS pcs +1 0.10.8-1.el8_4.3 RHSA-2023:0506
RHEL 8.2 TUS pcs +1 0.10.4-6.el8_2.4 RHSA-2023:0393
RHEL 8.2 E4S pcs +1 0.10.4-6.el8_2.4 RHSA-2023:0393
RHEL 8.1 E4S pcs +1 0.10.2-4.el8_1.3 RHSA-2023:0857

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 pcs +1 0.11.3-4.el9_1.2 ALSA-2023:0974
AlmaLinux 8 pcs +1 0.10.14-5.el8_7.2.alma ALSA-2023:0855

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 pcs 0.10.14-5.el8_7.2 RLSA-2023:0855

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 pcs +1 0.11.3-4.el9_1.2 ELSA-2023-12150
Oracle Linux 8 pcs +1 0.10.14-5.0.1.el8_7.2 ELSA-2023-12137

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

  • boost-legal/refile ★ 0 · Jun 30, 2026

    Private fork of refile/refile (pinned at c4ac577c) with sinatra ceiling raised to < 4.0 for CVE-2022-45442. See sc-47428.

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems sinatra >= 3.0, < 3.0.4 3.0.4 GHSA-2x8x-jmrp-phxw
RubyGems sinatra >= 2.0.0, < 2.2.3 2.2.3 GHSA-2x8x-jmrp-phxw

Advisories 16

References