CVE-2026-27822: Rust has Critical Stored XSS in Preview Modal, leading to Administrative Account Takeover

Published Feb 25, 2026
·
Updated

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 and 18-25 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>. 3. Same-Origin Vulnerability: RustFS typically hosts the management console and the S3 API on the same origin (e.g., the same IP and port). 4. Bypass Attack: An attacker can upload a file named xss.pdf but set its Content-Type metadata to text/html. Because the iframe is hosted on the same origin as the console, the executed script has unrestricted access to the parent window's localStorage.

PoC <img width="6006" height="3096" alt="CleanShot 2026-02-01 at 18 36 54@2x" src="https://github.com/user-attachments/assets/f2f5dae6-1e19-4133-9a69-f7d8ec604dad" />

This PoC demonstrates how to steal a victim's administrative credentials by tricking them into previewing a malicious file.

1. Create the malicious payload (xss.html): html <script> alert('XSS Success!\nLocalStorage Data: ' + JSON.stringify(window.parent.localStorage)); </script>

2. Setup the environment and upload the payload: bash 1. Create a target bucket mc mb rustfs/my-bucket

2. Upload the HTML file as a PDF with HTML content type mc cp xss.html rustfs/my-bucket/xss.pdf --attr "Content-Type=text/html"

3. Trigger the vulnerability: 1. Login to the RustFS Console as an administrator. 2. Navigate to my-bucket. 3. Click the "Preview" button for the xss.pdf file. 4. The JavaScript executes, demonstrating access to the administrative session data.

Impact - Character: Stored Cross-Site Scripting (XSS). - Target: System Administrators using the Console. - Result: Full Account Takeover (ATO). An attacker gains the victim's AccessKeyId, SecretAccessKey, and SessionToken. This allows the attacker to perform any administrative action, including deleting data, creating backdoors, or downloading the entire filesystem via the S3 API.

Proposed Mitigation 1. Origin Separation: Implement a dedicated domain for data delivery (e.g., .data.rustfs.io) that is different from the console domain. This leverages the Same-Origin Policy (SOP) to isolate user-uploaded content. 2. Security Headers: Implement strict security headers in the backend: - Content-Security-Policy (CSP): Disallow inline scripts and restrict script execution. - X-Content-Type-Options: nosniff: Prevent browsers from sniffing and executing content that differs from the declared type.

Other sources

RustFS is a distributed object storage system built in Rust. Prior to version 1.0.0-alpha.83, 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. Version 1.0.0-alpha.83 fixes the issue.

MITRE

Affected Software

84 affected componentsFixes available
RustFS RustFS<1.0.0-alpha.83
RustFS Rustfs Rust=1.0.0-alpha1
RustFS Rustfs Rust=1.0.0-alpha10
RustFS Rustfs Rust=1.0.0-alpha11
RustFS Rustfs Rust=1.0.0-alpha12
RustFS Rustfs Rust=1.0.0-alpha13
RustFS Rustfs Rust=1.0.0-alpha14
RustFS Rustfs Rust=1.0.0-alpha15
RustFS Rustfs Rust=1.0.0-alpha16
RustFS Rustfs Rust=1.0.0-alpha17
RustFS Rustfs Rust=1.0.0-alpha18
RustFS Rustfs Rust=1.0.0-alpha19
RustFS Rustfs Rust=1.0.0-alpha2
RustFS Rustfs Rust=1.0.0-alpha20
RustFS Rustfs Rust=1.0.0-alpha21
RustFS Rustfs Rust=1.0.0-alpha22
RustFS Rustfs Rust=1.0.0-alpha23
RustFS Rustfs Rust=1.0.0-alpha24
RustFS Rustfs Rust=1.0.0-alpha25
RustFS Rustfs Rust=1.0.0-alpha26
RustFS Rustfs Rust=1.0.0-alpha27
RustFS Rustfs Rust=1.0.0-alpha28
RustFS Rustfs Rust=1.0.0-alpha29
RustFS Rustfs Rust=1.0.0-alpha3
RustFS Rustfs Rust=1.0.0-alpha30
RustFS Rustfs Rust=1.0.0-alpha31
RustFS Rustfs Rust=1.0.0-alpha32
RustFS Rustfs Rust=1.0.0-alpha33
RustFS Rustfs Rust=1.0.0-alpha34
RustFS Rustfs Rust=1.0.0-alpha35
RustFS Rustfs Rust=1.0.0-alpha36
RustFS Rustfs Rust=1.0.0-alpha37
RustFS Rustfs Rust=1.0.0-alpha38
RustFS Rustfs Rust=1.0.0-alpha39
RustFS Rustfs Rust=1.0.0-alpha4
RustFS Rustfs Rust=1.0.0-alpha40
RustFS Rustfs Rust=1.0.0-alpha41
RustFS Rustfs Rust=1.0.0-alpha42
RustFS Rustfs Rust=1.0.0-alpha43
RustFS Rustfs Rust=1.0.0-alpha44
RustFS Rustfs Rust=1.0.0-alpha45
RustFS Rustfs Rust=1.0.0-alpha46
RustFS Rustfs Rust=1.0.0-alpha47
RustFS Rustfs Rust=1.0.0-alpha48
RustFS Rustfs Rust=1.0.0-alpha49
RustFS Rustfs Rust=1.0.0-alpha5
RustFS Rustfs Rust=1.0.0-alpha50
RustFS Rustfs Rust=1.0.0-alpha51
RustFS Rustfs Rust=1.0.0-alpha52
RustFS Rustfs Rust=1.0.0-alpha53
RustFS Rustfs Rust=1.0.0-alpha54
RustFS Rustfs Rust=1.0.0-alpha55
RustFS Rustfs Rust=1.0.0-alpha56
RustFS Rustfs Rust=1.0.0-alpha57
RustFS Rustfs Rust=1.0.0-alpha58
RustFS Rustfs Rust=1.0.0-alpha59
RustFS Rustfs Rust=1.0.0-alpha6
RustFS Rustfs Rust=1.0.0-alpha60
RustFS Rustfs Rust=1.0.0-alpha61
RustFS Rustfs Rust=1.0.0-alpha62
RustFS Rustfs Rust=1.0.0-alpha63
RustFS Rustfs Rust=1.0.0-alpha64
RustFS Rustfs Rust=1.0.0-alpha65
RustFS Rustfs Rust=1.0.0-alpha66
RustFS Rustfs Rust=1.0.0-alpha67
RustFS Rustfs Rust=1.0.0-alpha68
RustFS Rustfs Rust=1.0.0-alpha69
RustFS Rustfs Rust=1.0.0-alpha7
RustFS Rustfs Rust=1.0.0-alpha70
RustFS Rustfs Rust=1.0.0-alpha71
RustFS Rustfs Rust=1.0.0-alpha72
RustFS Rustfs Rust=1.0.0-alpha73
RustFS Rustfs Rust=1.0.0-alpha74
RustFS Rustfs Rust=1.0.0-alpha75
RustFS Rustfs Rust=1.0.0-alpha76
RustFS Rustfs Rust=1.0.0-alpha77
RustFS Rustfs Rust=1.0.0-alpha78
RustFS Rustfs Rust=1.0.0-alpha79
RustFS Rustfs Rust=1.0.0-alpha8
RustFS Rustfs Rust=1.0.0-alpha80
RustFS Rustfs Rust=1.0.0-alpha81
RustFS Rustfs Rust=1.0.0-alpha82
RustFS Rustfs Rust=1.0.0-alpha9
rust/rustfs<1.0.0-alpha.83
1.0.0-alpha.83

Event History

Feb 25, 2026
CVE Published
via MITRE·02:11 AM
Data Sourced
via MITRE·02:11 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·11:00 PM
Data Sourced
via GitHub·11:00 PM
DescriptionSeverityWeaknessAffected Software
Jan 23, 58126
Event
via FIRST·09:04 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-27822?

CVE-2026-27822 is rated as Critical due to its potential to allow Administrative Account Takeover via Stored XSS.

2

How do I fix CVE-2026-27822?

To remediate CVE-2026-27822, upgrade to RustFS version 1.0.0-alpha.83 or later.

3

What types of systems are affected by CVE-2026-27822?

CVE-2026-27822 affects all versions of RustFS up to and including 1.0.0-alpha.82.

4

What is the nature of the vulnerability in CVE-2026-27822?

CVE-2026-27822 is a Stored Cross-Site Scripting (XSS) vulnerability that allows arbitrary JavaScript execution.

5

Can CVE-2026-27822 lead to data breaches?

Yes, CVE-2026-27822 can potentially lead to data breaches by allowing attackers to compromise user sessions or capture sensitive information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203