CVE-2026-22042 — RustFS has IAM Incorrect Authorization in rustfs
RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.55%). Schedule for your next planned update.
Does your project use an affected rustfs version?
Paste your Cargo.lock to check it for CVE-2026-22042 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
The ImportIam admin API validates permissions using ExportIAMAction instead of ImportIAMAction, allowing a principal with export-only IAM permissions to perform import operations. Since importing IAM data performs privileged write actions (creating/updating users, groups, policies, and service accounts), this can lead to unauthorized IAM modification and privilege escalation.
Details
In ImportIam, the authorization check is implemented as follows:
validate_admin_request(
&req.headers,
&cred,
owner,
false,
vec![Action::AdminAction(AdminAction::ExportIAMAction)],
).await?;
However, this code resides in the Import IAM operation (struct ImportIam {}), which performs state-changing IAM writes.
The expected behavior is to validate against AdminAction::ImportIAMAction (or an equivalent import-specific admin action), not ExportIAMAction.
PoC
Prerequisites
- A RustFS deployment with IAM enabled.
- An IAM user or role that has Export IAM permission but does not have Import IAM or full admin permissions.
- Access credentials for that user.
Steps
-
Create or obtain an IAM principal with permission equivalent to:
AdminAction::ExportIAMActionand without Import IAM privileges.
-
Prepare a valid IAM import ZIP archive containing, for example:
- A new policy granting administrative permissions
- A user or service account bound to that policy
-
Send a request to the Import IAM endpoint (the same endpoint handled by
ImportIam::call), authenticating with the export-only credentials. -
Observe that:
- The request passes authorization.
- IAM entities from the archive are created or modified successfully.
Expected Result
- The request should be rejected with an authorization error (e.g., AccessDenied).
Actual Result
- The request succeeds, and IAM state is modified.
Advisory Timeline
- First published January 8, 2026 (322 days ago).
- Last revised February 3, 2026 — 25 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p rustfs --precise 1.0.0-alpha.79
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| rustfs crates.io · Affected: All versions | 1.0.0-alpha.79 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-285Improper AuthorizationMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P
References
Frequently Asked Questions
- What is CVE-2026-22042?
- RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2026-22042?
- CVE-2026-22042 affects rustfs. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-22042 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 39.3% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-68926CRITICAL
RustFS has a gRPC Hardcoded Token Authentication Bypass
- CVE-2026-27822CRITICAL
Rust has Critical Stored XSS in Preview Modal, leading to Administrative Account Takeover
- CVE-2026-21862HIGH
RustFS has SourceIp bypass via spoofed X-Forwarded-For/Real-IP headers
- GHSA-mm2q-qcmx-gw4wHIGH
RustFS: ListServiceAccount authorizes against wrong admin action, enabling cross-user enumeration and root service account takeover
- CVE-2026-40937HIGH
RustFS: Missing admin authorization on notification target endpoints allows unauthenticated configuration of event webhooks
- CVE-2025-68705HIGH
RustFS Path Traversal Vulnerability
- CVE-2026-27607HIGH
RustFS: Missing Post Policy Validation leads to Arbitrary Object Write
- CVE-2026-22043MEDIUM
RustFS has IAM deny_only Short-Circuit that Allows Privilege Escalation via Service Account Minting