Nginx · Nginx · CVE-2024-21510
**Name of the Vulnerable Software and Affected Versions**
sinatra versions 0.0.0 and later
**Description**
The issue is related to Reliance on Untrusted Inputs in a Security Decision via the `X-Forwarded-Host` 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.
**Recommendations**
For sinatra versions 0.0.0 and later, consider handling the `X-Forwarded-Host` header properly to prevent exploitation. As a temporary workaround, restrict access to the vulnerable module or function that processes the `X-Forwarded-Host` header until a patch is available. Additionally, avoid using the `X-Forwarded-Host` header for security decisions without proper validation. At the moment, there is no information about a newer version that contains a fix for this vulnerability.