Name of the Vulnerable Software and Affected Versions:
Puma versions prior to 6.4.3
Puma versions prior to 5.6.9
Description:
The issue is related to the handling of HTTP requests in Puma, a Ruby/Rack web server. Clients could overwrite values set by intermediate proxies, such as X-Forwarded-For, by providing an underscore version of the same header, for example, X-Forwarded For. This could allow an attacker to downgrade connections to HTTP or redirect responses, potentially causing confidentiality leaks. Users relying on proxy-set variables are affected.
Recommendations:
For Puma versions prior to 6.4.3, upgrade to version 6.4.3 or later.
For Puma versions prior to 5.6.9, upgrade to version 5.6.9 or later.
As a temporary workaround, consider using Nginx's underscores in headers configuration variable to discard headers with underscores at the proxy level.
Any users implicitly trusting proxy-defined headers for security should immediately cease doing so until upgraded to the fixed versions.