CVE-2026-22042: Rustfs RustFS Has IAM Incorrect Authorization Vulnerability

MODERATE
Advisory Identifier: GHSA-vcwh-pff9-64cc
CWE-285
Published
Advisory Summary

CVE-2026-22042 is a MODERATE rustfs has iam incorrect authorization vulnerability (CWE-285: Improper Authorization) affecting Rustfs libraries in the crates.io ecosystem. The issue involves rustfs has iam incorrect authorization in importiam that allows privilege escalation. Remediation is available by upgrading affected packages to version 1.0.0-alpha.79.

CVE-2026-22042 at a Glance

CVE Identifier CVE-2026-22042
GHSA Identifier GHSA-vcwh-pff9-64cc
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-285: Improper Authorization
Affected Product Rustfs
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2026-22042

To remediate this vulnerability, upgrade all affected Rustfs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rustfs fixed: 1.0.0-alpha.79
Upgrade rustfs to 1.0.0-alpha.79
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for rustfs

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-22042, inspect your project dependencies for Rustfs:

inspect dependencies for rustfs

Analyze the terminal output to locate any version of Rustfs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-alpha.79), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Rustfs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```rust 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.

CVE-2026-22042 Affected Rustfs Versions

1 component(s)
Fixed Versions:
1.0.0-alpha.79
Product / Package Ecosystem Affected Versions Fixed Version
rustfs
crates.io
< 1.0.0-alpha.79
1.0.0-alpha.79

References

Frequently Asked Questions

What is CVE-2026-22042?
CVE-2026-22042 is a security vulnerability in Rustfs involving RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation under CWE-285: Improper Authorization.
Which Rustfs versions are affected?
Affected versions include releases prior to 1.0.0-alpha.79 across affected packages: rustfs.
What version fixes CVE-2026-22042?
Upgrading to 1.0.0-alpha.79 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rustfs affected?
Yes, rustfs is affected in releases prior to 1.0.0-alpha.79. Upgrade your dependency to 1.0.0-alpha.79 or later.
What CWE is associated with CVE-2026-22042?
CVE-2026-22042 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check crates.io dependencies for CVE-2026-22042?
Run the dependency tree command: 'inspect dependencies for rustfs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vcwh-pff9-64cc",
  "modified" : "2026-01-08T20:36:17Z",
  "published" : "2026-01-08T20:36:17Z",
  "aliases" : [ "CVE-2026-22042" ],
  "summary" : "RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation",
  "details" : "### Summary\n\nThe `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**.\n\n---\n\n### Details\n\nIn `ImportIam`, the authorization check is implemented as follows:\n\n```rust\nvalidate_admin_request(\n    &req.headers,\n    &cred,\n    owner,\n    false,\n    vec![Action::AdminAction(AdminAction::ExportIAMAction)],\n).await?;\n```\n\nHowever, this code resides in the **Import IAM** operation (`struct ImportIam {}`), which performs **state-changing IAM writes**.\n\nThe expected behavior is to validate against **`AdminAction::ImportIAMAction`** (or an equivalent import-specific admin action), not `ExportIAMAction`.\n\n---\n\n### PoC\n\n**Prerequisites**\n\n1. A RustFS deployment with IAM enabled.\n2. An IAM user or role that has **Export IAM** permission but **does not** have Import IAM or full admin permissions.\n3. Access credentials for that user.\n\n**Steps**\n\n1. Create or obtain an IAM principal with permission equivalent to:\n\n   ```\n   AdminAction::ExportIAMAction\n   ```\n\n   and without Import IAM privileges.\n\n2. Prepare a valid IAM import ZIP archive containing, for example:\n\n   * A new policy granting administrative permissions\n   * A user or service account bound to that policy\n\n3. Send a request to the Import IAM endpoint (the same endpoint handled by `ImportIam::call`), authenticating with the export-only credentials.\n\n4. Observe that:\n\n   * The request passes authorization.\n   * IAM entities from the archive are created or modified successfully.\n\n**Expected Result**\n\n* The request should be rejected with an authorization error (e.g., AccessDenied).\n\n**Actual Result**\n\n* The request succeeds, and IAM state is modified.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "rustfs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-alpha.79"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rustfs/rustfs/security/advisories/GHSA-vcwh-pff9-64cc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22042"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rustfs/rustfs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-08T20:36:17Z",
    "nvd_published_at" : "2026-01-08T15:15:45Z"
  }
}