CVE-2026-21862: RustFS sourceIp bypass via spoofed X-Forwarded-For/Real-IP headers

Published Feb 3, 2026
·
Updated

Summary IP-based access control can be bypassed: getconditionvalues trusts client-supplied X-Forwarded-For/X-Real-Ip without verifying a trusted proxy, so any reachable client can spoof aws:SourceIp and satisfy IP-allowlist policies.

Details

- Vulnerable code: rustfs/src/auth.rs:289-304 sets remoteaddr from X-Forwarded-For/X-Real-Ip, then inserts SourceIp via getsourceipraw, with no trust boundary or proxy validation: - let remoteaddr = header.get("x-forwarded-for").andthen(...).orelse(|| header.get("x-real-ip")...).unwrapor("127.0.0.1"); - args.insert("SourceIp", vec![getsourceipraw(header, remoteaddr)]); - This value feeds IAM/bucket policy evaluation in rustfs/src/storage/access.rs (authorization path), so any request that forges the header can meet aws:SourceIp conditions. - No authentication is required beyond the request itself; the header is taken at face value even on direct connections.

PoC

rustfs-auth-trusted-ip-header-spoofing-poc.tar.gz

Steps (already included in rustfs-auth-trusted-ip-header-spoofing-poc/):

1. Start RustFS with two local volumes, e.g.:

mkdir -p /tmp/rustfs-data1 /tmp/rustfs-data2 RUSTFSACCESSKEY=devadmin RUSTFSSECRETKEY=devadmin \ cargo run --bin rustfs -- --address 0.0.0.0:9000 \ /tmp/rustfs-data1 /tmp/rustfs-data2

2. From rustfs-auth-trusted-ip-header-spoofing-poc/, run:

ENDPOINT=http://127.0.0.1:9000 make run

The script: - Creates bucket rustfs-trusted-ip-poc. - Applies a bucket policy allowing s3:ListBucket only from 10.0.0.5/32 (Principal: {"AWS":[""]}, Resource array). - Sends three unauthenticated ListBucket calls: - Baseline (no spoof) → HTTP 403. - Spoofed X-Forwarded-For: 10.0.0.5 → HTTP 200 (policy bypass). - Spoofed X-Forwarded-For: 1.2.3.4 → HTTP 403. - Responses saved to poc-baseline.xml, poc-spoofed.xml, poc-deny.xml.

Impact

- Vulnerability type: Authorization bypass of IP-allowlist (aws:SourceIp) via header spoofing. - Who is impacted: Any deployment relying on aws:SourceIp in IAM/bucket policies for S3 operations. Attackers with network reach to RustFS can forge forwarded-IP headers to gain list/read/write where IP restrictions were meant to block them.

Credits Identified by SecMate (https://secmate.dev) automated analysis and validated during manual triage.

Other sources

RustFS is a distributed object storage system built in Rust. Prior to version alpha.78, IP-based access control can be bypassed: getconditionvalues trusts client-supplied X-Forwarded-For/X-Real-Ip without verifying a trusted proxy, so any reachable client can spoof aws:SourceIp and satisfy IP-allowlist policies. This issue has been patched in version alpha.78.

MITRE

Affected Software

79 affected componentsFixes available
RustFS RustFS<alpha.78
rust/rustfs<1.0.0-alpha.78
1.0.0-alpha.78
RustFS Rustfs Rust=1.0.0-alpha1
RustFS Rustfs Rust=1.0.0-alpha10
RustFS Rustfs Rust=1.0.0-alpha11
RustFS Rustfs Rust=1.0.0-alpha12
RustFS Rustfs Rust=1.0.0-alpha13
RustFS Rustfs Rust=1.0.0-alpha14
RustFS Rustfs Rust=1.0.0-alpha15
RustFS Rustfs Rust=1.0.0-alpha16
RustFS Rustfs Rust=1.0.0-alpha17
RustFS Rustfs Rust=1.0.0-alpha18
RustFS Rustfs Rust=1.0.0-alpha19
RustFS Rustfs Rust=1.0.0-alpha2
RustFS Rustfs Rust=1.0.0-alpha20
RustFS Rustfs Rust=1.0.0-alpha21
RustFS Rustfs Rust=1.0.0-alpha22
RustFS Rustfs Rust=1.0.0-alpha23
RustFS Rustfs Rust=1.0.0-alpha24
RustFS Rustfs Rust=1.0.0-alpha25
RustFS Rustfs Rust=1.0.0-alpha26
RustFS Rustfs Rust=1.0.0-alpha27
RustFS Rustfs Rust=1.0.0-alpha28
RustFS Rustfs Rust=1.0.0-alpha29
RustFS Rustfs Rust=1.0.0-alpha3
RustFS Rustfs Rust=1.0.0-alpha30
RustFS Rustfs Rust=1.0.0-alpha31
RustFS Rustfs Rust=1.0.0-alpha32
RustFS Rustfs Rust=1.0.0-alpha33
RustFS Rustfs Rust=1.0.0-alpha34
RustFS Rustfs Rust=1.0.0-alpha35
RustFS Rustfs Rust=1.0.0-alpha36
RustFS Rustfs Rust=1.0.0-alpha37
RustFS Rustfs Rust=1.0.0-alpha38
RustFS Rustfs Rust=1.0.0-alpha39
RustFS Rustfs Rust=1.0.0-alpha4
RustFS Rustfs Rust=1.0.0-alpha40
RustFS Rustfs Rust=1.0.0-alpha41
RustFS Rustfs Rust=1.0.0-alpha42
RustFS Rustfs Rust=1.0.0-alpha43
RustFS Rustfs Rust=1.0.0-alpha44
RustFS Rustfs Rust=1.0.0-alpha45
RustFS Rustfs Rust=1.0.0-alpha46
RustFS Rustfs Rust=1.0.0-alpha47
RustFS Rustfs Rust=1.0.0-alpha48
RustFS Rustfs Rust=1.0.0-alpha49
RustFS Rustfs Rust=1.0.0-alpha5
RustFS Rustfs Rust=1.0.0-alpha50
RustFS Rustfs Rust=1.0.0-alpha51
RustFS Rustfs Rust=1.0.0-alpha52
RustFS Rustfs Rust=1.0.0-alpha53
RustFS Rustfs Rust=1.0.0-alpha54
RustFS Rustfs Rust=1.0.0-alpha55
RustFS Rustfs Rust=1.0.0-alpha56
RustFS Rustfs Rust=1.0.0-alpha57
RustFS Rustfs Rust=1.0.0-alpha58
RustFS Rustfs Rust=1.0.0-alpha59
RustFS Rustfs Rust=1.0.0-alpha6
RustFS Rustfs Rust=1.0.0-alpha60
RustFS Rustfs Rust=1.0.0-alpha61
RustFS Rustfs Rust=1.0.0-alpha62
RustFS Rustfs Rust=1.0.0-alpha63
RustFS Rustfs Rust=1.0.0-alpha64
RustFS Rustfs Rust=1.0.0-alpha65
RustFS Rustfs Rust=1.0.0-alpha66
RustFS Rustfs Rust=1.0.0-alpha67
RustFS Rustfs Rust=1.0.0-alpha68
RustFS Rustfs Rust=1.0.0-alpha69
RustFS Rustfs Rust=1.0.0-alpha7
RustFS Rustfs Rust=1.0.0-alpha70
RustFS Rustfs Rust=1.0.0-alpha71
RustFS Rustfs Rust=1.0.0-alpha72
RustFS Rustfs Rust=1.0.0-alpha73
RustFS Rustfs Rust=1.0.0-alpha74
RustFS Rustfs Rust=1.0.0-alpha75
RustFS Rustfs Rust=1.0.0-alpha76
RustFS Rustfs Rust=1.0.0-alpha77
RustFS Rustfs Rust=1.0.0-alpha8
RustFS Rustfs Rust=1.0.0-alpha9

Event History

Feb 3, 2026
CVE Published
via MITRE·04:06 PM
Data Sourced
via MITRE·04:06 PM
DescriptionWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
Affected Software
Advisory Published
via GitHub·05:31 PM
Data Sourced
via GitHub·05:31 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-21862?

CVE-2026-21862 has been classified with a high severity due to its potential to bypass IP-based access controls.

2

How do I fix CVE-2026-21862?

To fix CVE-2026-21862, upgrade to RustFS version 1.0.0-alpha.78 or later.

3

What types of systems are affected by CVE-2026-21862?

CVE-2026-21862 affects the RustFS software, specifically versions before 1.0.0-alpha.78.

4

What is the main issue with CVE-2026-21862?

The main issue with CVE-2026-21862 is that it allows IP-based access control to be bypassed through spoofed X-Forwarded-For or X-Real-Ip headers.

5

Can I be attacked through CVE-2026-21862?

Yes, exploiting CVE-2026-21862 could allow attackers to spoof client IP addresses and bypass access restrictions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203