Rust has Critical Stored XSS in Preview Modal, leading to Administrative Account Takeover
Date: 2026-02
Affected: rust/rustfs
Attack vector: xss
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2026-27607
CVE-2026-27822
CWE: CWE-79
CWE-863
CVSS: 9 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H)

### Summary A Stored Cross-Site Scripting (XSS) vulnerability in the RustFS Console allows an attacker to execute arbitrary JavaScript in the context of the management console. By bypassing the PDF preview logic, an attacker can steal administrator credentials from `localStorage`, leading to full account takeover and system compromise. ### Details The vulnerability exists due to improper validation of the response content type during the file preview process and a lack of origin separation between the S3 object delivery and the management console. 1. **Origin of Credentials**: The RustFS Console stores highly sensitive S3 credentials (AccessKey, SecretKey, SessionToken) in the browser's `localStorage`. - **File**: `console/composables/useAuth.ts` - **Evidence**: [Lines 14](https://github.com/rustfs/console/blob/c2bd75adacad0d0182c32d5271e8ff150c4a02db/composables/useAuth.ts#L14) and [18-25](https://github.com/rustfs/console/blob/c2bd75adacad0d0182c32d5271e8ff150c4a02db/composables/useAuth.ts#L18-L25) show that credentials are held in `useLocalStorage('auth.credentials', {})` and `useLocalStorage('auth.permanent', undefined)`. 2. **Insecure Preview Implementation**: In `console/components/object/preview-modal.vue`, the application identifies a PDF file based on its extension or metadata and [renders it using an `<iframe>`](https://github.com/rustfs/console/blob/6ab024be1c49bc9549a24ed1d09348f5e7039876/components/object/preview-modal.vue#L10). 3. **Same-Origin Vulnerabi


Mitigations:

Architectural layers (MAESTRO):