RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation

説明

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.

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

  2. 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.

基本情報

タイプ
reviewed
深刻度
medium
GitHub 上のアドバイザリ
アドバイザリを開く ↗
リポジトリのアドバイザリ
リポジトリのアドバイザリを開く ↗
ソースコード
ソースを見る ↗
公開(アドバイザリ)
2026-01-08 20:36:17 UTC
更新
2026-01-08 20:36:18 UTC
GitHub レビュー済み
2026-01-08 20:36:17 UTC
NVD で公開
2026-01-08

EPSS Score

Score Percentile
0.05% 15.51%

CVSS Scores

Base score Version Severity Vector
5.7 4.0
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 クリックして展開
攻撃ベクター (AV:N)
インターネットや社内 WAN など、ルーティングされたネットワーク越しに遠隔から踏み台にしうる。
攻撃の複雑さ (AC:L)
手順が短く、再現性が高い。
攻撃要件 (AT:N)
到達性以外に、追加のインフラ条件やデータ前提は要らない。
必要な権限 (PR:L)
一般ユーザー権限で足り、管理者は不要。
ユーザーの関与 (UI:N)
被害者の操作なしでも攻撃が完結しうる。
脆弱システムの機密性への影響 (VC:N)
脆弱な対象から機微情報が読まれうる余地はほとんどない。
脆弱システムの完全性への影響 (VI:H)
監査ログの改竄や広範なデータ偽装など、信頼根拠を崩す水準。
脆弱システムの可用性への影響 (VA:N)
業務を止めるほどの停止や劣化は想定しにくい。
後続システムの機密性への影響 (SC:N)
脆弱点を経由して下流の機微情報が読まれうる余地はほとんどない。
後続システムの完全性への影響 (SI:N)
下流の記録や設定が歪められる局面はほとんど想定されない。
後続システムの可用性への影響 (SA:N)
下流サービスが止まるほどの影響は想定しにくい。
悪用の成熟度(Threat) (E:P)
再現手順や PoC は公開されているが、実害報告や自動化キットはない。

Identifiers

CWEs

CWE id Name
CWE-285 Improper Authorization

Credits

  • Threonine (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
rust rustfs < 1.0.0-alpha.79 1.0.0-alpha.79

References

cvelogic Threat Intelligence