CVE-2026-126083
### Impact Since Rails 8.1.0, `ActionDispatch::RemoteIp` derives `request.remote_ip` from `Rack::Request#forwarded_for`, which under Rack 3 reads the RFC 7239 `Forwarded` header in preference to `X-Forwarded-For`. When a reverse proxy appends the client address to `X-Forwarded-For` but passes a client-supplied `Forwarded` header through unchanged, `request.remote_ip` returns an address chosen by the client, and the IP spoofing check does not raise, because it compares only `Client-Ip` with the forwarded addresses. An unauthenticated attacker could therefore spoof `request.remote_ip`, possibly bypassing IP-based access controls and rate limits keyed on the client address (including the default `by:` of `rate_limit`), and falsifying the client address in logs. ### Details The 8.1.0 change ([2d084af8](https://github.com/rails/rails/commit/2d084af8444a7b6b868c7cbb256172007871e78d)) switched `ActionDispatch::RemoteIp` from reading `X-Forwarded-For` directly to Rack's `forwarded_for`, in order to reuse Rack's port handling. Rails continues to honor `Forwarded`, the standard header. In the fixed releases, when `config.action_dispatch.ip_spoofing_check` is enabled (the default), `ActionDispatch::RemoteIp` also compares the first untrusted client address in `Forwarded` with the first untrusted client address in `X-Forwarded-For`, as exact strings, and raises `ActionDispatch::RemoteIp::IpSpoofAttackError` when both headers are present and the addresses differ. Deployments whose proxies report the client address inconsistently between the two headers will receive this error after upgrading. See the `actionpack` CHANGELOG. ### Affected applications An application is affected if it meets all of these requirements: - Runs Rails 8.1.0 through 8.1.4 with Rack 3. Under Rack 2.2, `forwarded_for` reads only `X-Forwarded-For`. - Is served behind a proxy that does not remove or overwrite a client-supplied `Forwarded` header. - Relies on `request.remote_ip` for access control, rate li
Properties
- Summary
- Action Pack: Possible IP spoofing in Action Dispatch RemoteIp
- Severity
- high
- Nvd fetched at
- 2026-11-10T23:33:48.924589+00:00
- Cvss score
- 7.4
- Cvss severity
- HIGH
- Retrieved at
- 2026-11-10T23:34:27+00:00
- Ghsa published
- 2026-11-10T21:20:06Z
- Source url
- https://github.com/advisories/GHSA-2gff-2mmg-m73p
- Ghsa updated
- 2026-11-10T21:20:07Z
- Ghsa id
- GHSA-2gff-2mmg-m73p
- Last source
- GitHub Advisory Database
- Score
- 7.4
- Cvss version
- 3.0
- Cve id
- CVE-2026-126083
- Cvss vector
- CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- First seen by Signal
- 2026-11-10T23:31:41+00:00
- Is ghsa only
- false
- Vector
- CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- Published at
- 2026-11-10T21:19:27.133
- Last modified
- 2026-11-10T21:19:27.133
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph