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.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)0.7%top 46.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

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

EcosystemPackageFixed inAdvisory
AlmaLinux:8pcs0.10.14-5.el8_7.2.almaALSA-2023:0855
AlmaLinux:9pcs0.11.3-4.el9_1.2ALSA-2023:0974
AlmaLinux:8pcs-snmp0.10.14-5.el8_7.2.almaALSA-2023:0855
AlmaLinux:9pcs-snmp0.11.3-4.el9_1.2ALSA-2023:0974
Debian:12ruby-sinatra3.0.5-2DEBIAN-CVE-2022-45442
Debian:13ruby-sinatra3.0.5-2DEBIAN-CVE-2022-45442
Debian:14ruby-sinatra3.0.5-2DEBIAN-CVE-2022-45442
Rocky Linux:8pcs0:0.10.14-5.el8_7.2RLSA-2023:0855
RubyGemssinatra3.0.4GHSA-2x8x-jmrp-phxw
RubyGemssinatra2.2.3GHSA-2x8x-jmrp-phxw
Ubuntu:22.04:LTSruby-sinatra2.0.8.1-2+deb11u1build0.22.04.1USN-7664-1
Ubuntu:22.04:LTSruby-sinatra2.0.8.1-2+deb11u1build0.22.04.1UBUNTU-CVE-2022-45442

Affected products (as reported)

VendorProductVersions
sinatra sinatra >= 3.0, < 3.0.4>= 2.0, < 2.2.3

Weakness: CWE-494 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References