# CVE-2024-21510: Sinatra vulnerable to Reliance on Untrusted Inputs in a Security Decision

- Severity: Medium 5.4 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-01)
- Published: 2024-11-01T05:00:04.821Z
- Modified: 2026-09-10T03:50:20.789Z
- Also known as: GHSA-hxx2-7vcw-mqr3
- Weaknesses: CWE-807
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- sinatra: from 0.0.0 before *
- sinatra (RubyGems): before 4.1.0

## Every score

- snyk: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`

## References

- <https://security.snyk.io/vuln/SNYK-RUBY-SINATRA-6483832> (web)
- <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> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21510> (advisory)
- <https://github.com/advisories/GHSA-hxx2-7vcw-mqr3> (advisory)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2024-21510.yml> (web)
- <https://github.com/sinatra/sinatra> (package)
- <https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb#L319> (web)
- <https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb#L323C1-L343C17> (web)
- <https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md#410--2024-11-18> (web)

## Sources

- CVE List: [CVE-2024-21510](https://www.cve.org/CVERecord?id=CVE-2024-21510), CVE Terms of Use, modified 2024-11-18
- GitHub Advisory Database: [GHSA-hxx2-7vcw-mqr3](https://github.com/advisories/GHSA-hxx2-7vcw-mqr3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-21510](https://nvd.nist.gov/vuln/detail/CVE-2024-21510), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-21510 · Whole record: https://cve.day/CVE-2024-21510.json · Rebuilt by cve.day 2026-11-25T22:58:47.573Z
