Skip to content
High 7.4

Action Packのリモート IP判定に不正な偽装を許す脆弱性、Rails 8.1.0以降に影響

CVE-2026-126083 First seen on SecPulse

Summary

Action Pack(Ruby on Rails)のActionDispatch::RemoteIpに、クライアントのIPアドレスを偽装される脆弱性が見つかりました。8.1.0以降のRailsで、クライアントが送った Forwarded ヘッダーがX-Forwarded-Forより優先されるため、IP制限やレート制限を回避されるおそれがあります。影響するのはactionpackの8.1.4.1より前の版で、8.1.4.1で修正されています。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

Action Pack(Ruby on Rails)のActionDispatch::RemoteIpに、クライアントのIPアドレスを偽装される脆弱性が見つかりました。8.1.0以降のRailsで、クライアントが送った Forwarded ヘッダーがX-Forwarded-Forより優先されるため、IP制限やレート制限を回避されるおそれがあります。影響するのはactionpackの8.1.4.1より前の版で、8.1.4.1で修正されています。

Affected packages

PackageAffected → Fixed
railsrails —
rubygemsactionpack
≥ 8.1.0.beta1, < 8.1.4.1→ 8.1.4.1

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

Action Pack is a framework for handling and responding to web requests. From 8.1 until 8.1.4.1, 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. 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 limiting, or auditing. The fix detects a spoofed Forwarded header only when the proxy also sets X-Forwarded-For. An application whose proxy passes a client-supplied Forwarded header through and sets no X-Forwarded-For remains exposed after upgrading, and should configure the proxy to remove or overwrite Forwarded, or apply the workaround below. This is…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details