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-30228
6.9

CVE-2026-30228: Authorization Bypass in Parse Server Files API via readOnlyMasterKey

Alon Barad
Alon Barad
Software Engineer

Mar 6, 2026·5 min read·5 visits

PoC Available

Executive Summary (TL;DR)

The `readOnlyMasterKey` in Parse Server, designed for read-only access, can be used to upload or delete files via the Files API due to missing authorization checks. Patched in versions 8.6.5 and 9.5.0-alpha.3.

A high-severity authorization bypass exists in Parse Server's Files API, enabling holders of the `readOnlyMasterKey` to perform unauthorized write operations. While this key is architecturally intended to restrict access to read-only database queries, a logic flaw in the `FilesRouter` component permits it to bypass checks for file creation and deletion. This allows restricted administrators or compromised services possessing the read-only key to upload arbitrary files or delete existing assets, violating the integrity and availability of the application's file storage.

Vulnerability Overview

Parse Server acts as a backend-as-a-service, offering database, file storage, and authentication APIs. To facilitate administrative tasks without granting full control, Parse Server implements a readOnlyMasterKey. Ideally, this credential functions similarly to the primary masterKey—bypassing Access Control Lists (ACLs) and Class-Level Permissions (CLPs)—but is strictly scoped to read operations (GET or find).

The vulnerability, identified as CVE-2026-30228, resides in the specific implementation of the Files API. While the core database triggers correctly enforce the read-only restriction, the file management endpoints (/files/:filename) failed to validate this constraint. Consequently, a request authenticated with the readOnlyMasterKey is treated with the same privileges as the full masterKey during file operations.

This flaw represents a classic Incorrect Authorization (CWE-863) issue. It breaks the security model of the least privilege principle, as credentials explicitly issued for auditing, analytics, or monitoring can be weaponized to modify application content.

Root Cause Analysis

The root cause lies in the request handling logic within src/Routers/FilesRouter.js. In Parse Server, authentication middleware processes headers (such as X-Parse-Master-Key) and populates the req.auth object. When the readOnlyMasterKey is provided, the middleware sets req.auth.isReadOnly = true alongside req.auth.isMaster = true.

The FilesRouter defines handlers for creating (createHandler) and deleting (deleteHandler) files. These handlers verify if the user has permission to write files. The logic correctly checks for req.auth.isMaster to allow administrative overrides. However, in the affected versions, the handlers omitted a subsequent check for req.auth.isReadOnly.

Because isMaster is true for both the full master key and the read-only master key, the router authorized the write operations. The handlers processed the file upload or deletion immediately after confirming master privileges, disregarding the isReadOnly flag that should have acted as a guardrail.

Code Analysis

The remediation involved inserting an explicit guard clause at the beginning of the write operations in FilesRouter.js. The patch ensures that even if a request possesses master privileges, it is rejected if those privileges are flagged as read-only.

Below is the analysis of the fix applied in version 8.6.5 (Commit 07bddc0).

// src/Routers/FilesRouter.js
 
// [FIXED] createHandler now explicitly rejects read-only keys
async createHandler(req, res, next) {
+  if (req.auth.isReadOnly) {
+    const error = createSanitizedHttpError(403, "read-only masterKey isn't allowed to create a file.", req.config);
+    res.status(error.status);
+    res.end(`{"error":"${error.message}"}`);
+    return;
+  }
   const config = req.config;
   const fileData = req.body;
   // ... file creation logic proceeds only if not read-only
}
 
// [FIXED] deleteHandler applies the same restriction
async deleteHandler(req, res, next) {
+  if (req.auth.isReadOnly) {
+    const error = createSanitizedHttpError(403, "read-only masterKey isn't allowed to delete a file.", req.config);
+    res.status(error.status);
+    res.end(`{"error":"${error.message}"}`);
+    return;
+  }
   try {
     // ... file deletion logic
   }

The patch introduces a conditional check if (req.auth.isReadOnly) that returns a 403 Forbidden error, effectively closing the bypass path.

Exploitation

Exploitation of this vulnerability requires possession of the readOnlyMasterKey. This key is often distributed to semi-trusted internal services, dashboard viewers, or analytics platforms, under the assumption that it cannot modify data. An attacker with access to this key can interact with the Files API to perform unauthorized actions.

Attack Scenario: File Deletion To delete a critical asset (e.g., a logo or configuration file), the attacker sends a DELETE request authenticated with the read-only key.

DELETE /files/critical-asset.png HTTP/1.1
Host: api.target-app.com
X-Parse-Application-Id: <APP_ID>
X-Parse-Master-Key: <READ_ONLY_MASTER_KEY>

Attack Scenario: Malicious File Upload An attacker can upload arbitrary files, potentially hosting malware or phishing pages on the application's domain. The server accepts the upload because the readOnlyMasterKey satisfies the isMaster check.

POST /files/malware.html HTTP/1.1
Host: api.target-app.com
X-Parse-Application-Id: <APP_ID>
X-Parse-Master-Key: <READ_ONLY_MASTER_KEY>
Content-Type: text/html
 
<script>/* malicious payload */</script>

Prior to the patch, the server would process these requests successfully, returning a 201 Created or 200 OK status.

Impact Assessment

The impact of CVE-2026-30228 spans integrity and availability, with the severity dependent on how widely the readOnlyMasterKey is distributed.

Integrity Impact (High): Attackers can upload content to the application's file storage. This could be used to host phishing sites on a trusted domain, distribute malware, or deface the application by overwriting existing assets (if the storage adapter supports overwrites).

Availability Impact (High): The vulnerability allows for the deletion of any file accessible via the API. Attackers could systematically delete user avatars, document attachments, or critical application assets, causing denial of service or permanent data loss.

Confidentiality Impact (None): The vulnerability does not grant additional read access beyond what the readOnlyMasterKey already permits.

The CVSS v4.0 score of 6.9 reflects the requirement for high privileges (PR:H), as the attacker must possess a valid master key variant. However, the attack complexity is low (AC:L), and no user interaction is required.

Official Patches

Parse CommunityParse Server 8.6.5 Release Notes
GitHub AdvisoryGHSA-xfh7-phr7-gr2x

Fix Analysis (2)

Technical Appendix

CVSS Score
6.9/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Affected Systems

Parse Server

Affected Versions Detail

Product
Affected Versions
Fixed Version
parse-server
Parse Community
< 8.6.58.6.5
parse-server
Parse Community
>= 9.0.0, < 9.5.0-alpha.39.5.0-alpha.3
AttributeDetail
CVE IDCVE-2026-30228
CVSS v4.06.9 (Medium)
CWECWE-863 (Incorrect Authorization)
Attack VectorNetwork
Privileges RequiredHigh (readOnlyMasterKey)
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-863
Incorrect Authorization

Known Exploits & Detection

GitHubRegression test case included in the fix commit demonstrating the bypass

Vulnerability Timeline

Patch released in v8.6.5 and v9.5.0-alpha.3
2026-03-05
GHSA-xfh7-phr7-gr2x published
2026-03-05
CVE-2026-30228 published
2026-03-06

References & Sources

  • [1]GHSA-xfh7-phr7-gr2x
  • [2]Fix Commit (v8)

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.