5.7medium
RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation
- Severity
- 5.7medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.43% (higher than 39% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vcwh-pff9-64cc
Description
RustFS is a distributed object storage system built in Rust. Prior to version 1.0.0-alpha.79, he `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. Version 1.0.0-alpha.79 fixes the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rustfs rustfs | < 1.0.0-alpha.79, 1.0.0 | CVE List, NVD |
| rustfs (crates.io) | before 1.0.0-alpha.79 | GitHub Advisory Database |
All scores
| GitHub_M | 5.7medium CVSS: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 |
| GitHub | medium CVSS: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 |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
RustFS is a distributed object storage system built in Rust. Prior to version 1.0.0-alpha.79, he `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. Version 1.0.0-alpha.79 fixes the issue.
GitHub Advisory Database
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.
NVD (es)
RustFS es un sistema de almacenamiento de objetos distribuido construido en Rust. Antes de la versión 1.0.0-alpha.79, la API de administración 'ImportIam' valida los permisos usando 'ExportIAMAction' en lugar de 'ImportIAMAction', permitiendo que una entidad con permisos IAM solo de exportación realice operaciones de importación. Dado que la importación de datos IAM realiza acciones de escritura privilegiadas (creación/actualización de usuarios, grupos, políticas y cuentas de servicio), esto puede llevar a una modificación no autorizada de IAM y escalada de privilegios. La versión 1.0.0-alpha.79 corrige el problema.
References
| https://github.com/rustfs/rustfs/security/advisories/GHSA-vcwh-pff9-64cc | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-22042 | advisory | |
| https://github.com/rustfs/rustfs | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-22042 changed 2026-01-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vcwh-pff9-64cc changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2026-22042 changed 2026-06-17 | Public domain |