Skip to main content

CVE-2026-22042 — RustFS has IAM Incorrect Authorization in rustfs

MEDIUM

RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation

Published January 8, 2026Updated February 3, 2026Source: OSV

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.

Check my Cargo.lock

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

  1. A RustFS deployment with IAM enabled.
  2. An IAM user or role that has Export IAM permission but does not have Import IAM or full admin permissions.
  3. Access credentials for that user.

Steps

  1. Create or obtain an IAM principal with permission equivalent to:

    AdminAction::ExportIAMAction
    

    and without Import IAM privileges.

  2. 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
  3. Send a request to the Import IAM endpoint (the same endpoint handled by ImportIam::call), authenticating with the export-only credentials.

  4. 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 rustfs to 1.0.0-alpha.79 or later
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).

PackageFixed In
rustfs crates.io · Affected: All versions1.0.0-alpha.79

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-285
    Improper AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

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

CVSS Score
6.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.55%
EPSS percentile: 39.3

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

GHSA-vcwh-pff9-64cc

Related CVEs

  • CVE-2025-68926
    CRITICAL

    RustFS has a gRPC Hardcoded Token Authentication Bypass

  • CVE-2026-27822
    CRITICAL

    Rust has Critical Stored XSS in Preview Modal, leading to Administrative Account Takeover

  • CVE-2026-21862
    HIGH

    RustFS has SourceIp bypass via spoofed X-Forwarded-For/Real-IP headers

  • GHSA-mm2q-qcmx-gw4w
    HIGH

    RustFS: ListServiceAccount authorizes against wrong admin action, enabling cross-user enumeration and root service account takeover

  • CVE-2026-40937
    HIGH

    RustFS: Missing admin authorization on notification target endpoints allows unauthenticated configuration of event webhooks

  • CVE-2025-68705
    HIGH

    RustFS Path Traversal Vulnerability

  • CVE-2026-27607
    HIGH

    RustFS: Missing Post Policy Validation leads to Arbitrary Object Write

  • CVE-2026-22043
    MEDIUM

    RustFS has IAM deny_only Short-Circuit that Allows Privilege Escalation via Service Account Minting

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock