The vulnerability allows an attacker to bypass IP-based access controls by spoofing the X-Forwarded-For or X-Real-IP headers. The root cause is located in the rustfs::auth::get_condition_values function within rustfs/src/auth.rs.
Prior to the patch, this function would read the aforementioned headers to determine the remote_addr, which was then used to evaluate aws:SourceIp conditions in IAM and bucket policies. The patch rectifies this by changing the application to obtain the client's IP address directly from the underlying socket connection at the server level (rustfs/src/server/http.rs). This trusted IP address is then passed down through the call stack as a new remote_addr parameter to get_condition_values. The vulnerable code that read the headers inside get_condition_values was removed. This ensures that the real client IP address is used for security policy evaluation, preventing spoofing.