GHSA-VCWH-PFF9-64CC
RustFS has IAM Incorrect Authorization in ImportIam that Allows Privilege Escalation
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-VCWH-PFF9-64CC divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Remediación | Parche 1.0.0 | rustfs · 252 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice |
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::ExportIAMAction
```
and 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.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
crates.iorustfs |
Corregida | 1.0.0 | 252 d | 1.0.1 no afectada |
1.0.0-alpha.791.0.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://nvd.nist.gov/vuln/detail/CVE-2026-22042https://github.com/rustfs/rustfs/security/advisories/GHSA-vcwh-pff9-64cchttps://github.com/rustfs/rustfsLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
