Vulnerability · Published Nov 1, 2024 · Assigned by snyk
CVE-2024-21510
Medium 5.4
In plain English
A medium-severity security flaw in sinatra. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Versions of the package sinatra from 0.0.0 are vulnerable to Reliance on Untrusted Inputs in a Security Decision via the X-Forwarded-Host (XFH) header. When making a request to a method with redirect applied, it is possible to trigger an Open Redirect Attack by inserting an arbitrary address into this header. If used for caching purposes, such as with servers like Nginx, or as a reverse proxy, without handling the X-Forwarded-Host header, attackers can potentially exploit Cache Poisoning or Routing-based SSRF.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | pcs | 0.10.18-2.el8_10.3.alma.1 | ALSA-2024:10987 |
| AlmaLinux:8 | pcs-snmp | 0.10.18-2.el8_10.3.alma.1 | ALSA-2024:10987 |
| Debian:12 | ruby-sinatra | no fix listed | DEBIAN-CVE-2024-21510 |
| Debian:13 | ruby-sinatra | 4.1.1-2 | DEBIAN-CVE-2024-21510 |
| Debian:14 | ruby-sinatra | 4.1.1-2 | DEBIAN-CVE-2024-21510 |
| Rocky Linux:8 | pcs | 0:0.10.18-2.el8_10.3 | RLSA-2024:10987 |
| RubyGems | sinatra | 4.1.0 | GHSA-hxx2-7vcw-mqr3 |
| Ubuntu:22.04:LTS | ruby-sinatra | no fix listed | UBUNTU-CVE-2024-21510 |
| Ubuntu:24.04:LTS | ruby-sinatra | no fix listed | UBUNTU-CVE-2024-21510 |
Affected products (as reported)
Weakness: CWE-807 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P
References
- https://security.snyk.io/vuln/SNYK-RUBY-SINATRA-6483832
- https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb%23L319
- https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb%23L323C1-L343C17
- https://github.com/sinatra/sinatra/pull/2010