Forwarded Without Question: How Web Frameworks Overtrust the Forwarded Header
Source Reddit NetSec
Fixed in 8.1.4.1 : update affected systems when convenient.
Data as of 6 Nov 2026, 10:48 UTC
Rated by Threat Radar
- Patch
- Available – fixed in 8.1.4.1
What to do
AI-suggested
Upgrade Rails actionpack to version 8.1.4.1 or later where the spoofing check is implemented. Configure reverse proxies to remove or overwrite any client-supplied Forwarded headers to prevent spoofing. As a workaround, applications can configure Rack to ignore the Forwarded header by setting Rack::Request.forwarded_priority = [:x_forwarded] in an initializer if the proxy sets X-Forwarded-For. This workaround requires Rack 3.0.0 or later.
Discussion
A vulnerability in Ruby on Rails versions 8.1.0 through 8.1.4 allows unauthenticated attackers to spoof the client IP address via the Forwarded HTTP header. This occurs because Rails trusts the Forwarded header by default, which can be manipulated if a reverse proxy does not remove or overwrite client-supplied Forwarded headers. This spoofing can bypass IP-based access controls, rate limits, and falsify client IP information in logs.
r/netsec (opens in a new tab)u/luryus0 points0 comments
Many common web frameworks like Spring and Ruby on Rails trust the Forwarded header by default, even though most proxies don't actually have any support for it. This makes apps vulnerable to request hostname or client IP address spoofing in the default configurations.
I've been researching how the Forwarded header is supported across frameworks and proxies. Rails and Spring recently shipped fixes following my research. There are still other frameworks that need application configuration changes to be secure.