Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Forwarded Without Question: How Web Frameworks Overtrust the Forwarded Header

The article examines the risks associated with the Forwarded header in web applications, particularly when web frameworks and reverse proxies overtrust this header. The Forwarded header, defined in RFC 7239, is intended to replace the non-standard X-Forwarded-* headers and provides standardized information about the client IP address, original host name, and request protocol.

However, the article highlights that many web frameworks, including Rails, Spring, and Jetty, read values from the Forwarded header in their default configurations. This can lead to client IP and request host name spoofing if these headers are trusted without proper validation. The issue arises because most reverse proxies, CDNs, and middleware servers do not modify the Forwarded header in requests, allowing untrusted values to be passed directly to web applications.

The article suggests that developers and administrators should ensure that proxies and applications agree on the headers that are trusted and configure proxies to drop any untrusted proxy headers. The Forwarded header combines multiple X-F headers into one, but its adoption is still limited, as it requires support from both web frameworks and middleware servers. The article notes that the lack of real benefits over X-F headers and the relatively recent adoption of Forwarded have limited its widespread use.

The risks of Forwarded header misuse are well-documented, with examples of how attackers could exploit overlapping information from X-F and Forwarded headers to bypass IP address restrictions, rate limits, and password reset email defenses. The article concludes by stating that trusted proxy configurations are crucial in preventing such spoofing attacks, but these mechanisms are ineffective if the proxy itself passes sensitive headers to the backend application without proper validation.

Rewritten by urgent.news; may contain errors — check the original.

Read the original at lkoskela.fi →

More in Tech

Boundary change, not version bump

The WASI Subgroup voted to ratify WASI 0.3.0, and the change sitting under the version number is that stream<T> , future<T> , and async are now first-class constructs in the WebAssembly Component…

  • WASI 0.3.0 ratified with major changes to WebAssembly Component Model
  • Stream T, future T, and async now first-class constructs across components
  • WASI 0.3 introduces completion-based behavior closer to Linux iouring

More from Saturday 7 November →