Background

Parse Server is an open-source backend framework for Node.js. It was originally Facebook’s Parse platform and is now community maintained. It gives mobile and web apps a ready-made backend: a database API (backed by MongoDB or PostgreSQL), user accounts and sessions, file storage, push notifications and server-side Cloud Code.

Apps built on it store data as objects grouped into classes. A Club class might hold clubs and an Item class might hold items. Access is controlled at two levels:

  • ACL (access control list) is attached to one object and says which users or roles may read or write it.
  • CLP (class-level permissions) apply to a whole class, for example “anyone may read, only admins may write”.

Parse also supports relations, a way to link many objects to one owner. A Club can have an items Relation field that lists its member items. Behind the scenes a relation is stored in a separate join table of (owner ID, member ID) pairs. Clients ask for the members with a $relatedTo query, which names the owner object and the relation key.

Terms used below:

  • Owner is the object that holds the Relation field. Member is an object listed in it.
  • Object ID is the unique string identifier of an object.
  • Query operator is a MongoDB-style condition such as {"$gt": ""} (“greater than the empty string”).

Summary

A relation query can disclose links belonging to unreadable owning objects by accepting a database operator where a single object ID is expected. The owning-object check succeeds against one readable object, while the subsequent lookup includes relations from private owners.

In a $relatedTo query, the owner contains the Relation field and the returned objects are its members. Those are separate authorization decisions: an application can expose an item publicly while keeping its membership in a private collection confidential. The flaw breaks that distinction. It reveals private relationships between readable items and unreadable owners, without needing to bypass every read permission on the member objects.

How the Vulnerability Works

Parse makes two separate decisions in a $relatedTo query. First it checks that the caller may read the owner. Then it looks up the members in the join table. The system assumes the first check applies to the second step, because both use “the owner ID” from the request.

The vulnerability is that “the owner ID” does not have to be a single ID. The code never requires it to be a string. A normal request looks like this:

JSON
{
  "$relatedTo": {
    "object": { "__type": "Pointer", "className": "Club", "objectId": "abc123" },
    "key": "items"
  }
}

The attacker replaces the string "abc123" in the objectId field with an operator that matches many values:

JSON
{ "__type": "Pointer", "className": "Club", "objectId": { "$gt": "" } }

Now the two steps see different things:

  1. Authorization check. It asks the database for owners matching the condition and the caller’s permissions. The attacker owns at least one readable club, so at least one row comes back and the check passes.
  2. Join table lookup. The same condition is passed to the database against the join table. “ID greater than the empty string” is true for every owner, including private clubs the attacker cannot read, so the result lists members of all of them.

Neither the owner objects nor the member objects are read without permission. What leaks is the relationship: that a particular readable item belongs to a collection the caller should not know about. In an app where private group membership is sensitive, that is a real confidentiality loss.

The root pattern is a classic one. Input that should be a plain value is accepted as a query, and the same untrusted value is then used in two places that must agree. This finding was also a bypass of an earlier fix, which had added the owner check but left the value unchecked.

Prerequisites

The caller must be able to query the relevant class and read at least one owning object. The linked objects returned by the query must also be readable to that caller. If an owner is publicly readable, the attack may be reachable without authentication.

A private collection linked to a readable item illustrates the boundary: the caller can see the item, but should not learn that the private collection contains it. Knowledge of the private owner’s literal ID is unnecessary when an operator selects a broader set.

Attack Path

Attack route
Attacker routeMitigationCtrl + scroll to zoom
  1. START
    Caller can read at least one owning object
  2. STEP 01
    Supply an operator instead of a relation owner ID

    A value such as {"$gt":""} describes a set of owners rather than one owner.

    MITIGATION Require a string object ID and validate the relation reference

  3. STEP 02
    Authorization succeeds against a readable owner
  4. STEP 03
    Join-table query spans private owners

    MITIGATION Keep relation lookup scope identical to the authorized owner scope

  5. STEP 04
    Learn private relationship membership

Root Cause

This is a bypass of the owning-object authorization added for GHSA-wmwx-jr2p-4j4r.

The value flows through authorizeRelatedToQuery, reduceRelationKeys and relatedIds in DatabaseController.js. The first step checks access using the supplied owning objectId, but does not require it to be a string. Supplying {"$gt":""} turns that check into a query that can succeed against any readable owner.

The same value then reaches the relation join-table lookup, where MongoDB interprets it as a range predicate across owning IDs. The authorization check establishes that at least one matching owner is readable. The relation lookup uses a broader set of owners without an equivalent per-owner check. This is why adding an ownership check alone was insufficient in the earlier fix.

Validation

The proof of concept ran against Parse Server 9.10.2 with MongoDB, using a private victim club linked to a readable item, and an attacker-owned club linked to another item. Querying with the literal private club ID returned no results. Querying with the attacker’s literal club ID returned only its own related item. Replacing the ID with the operator returned both items.

The controls demonstrate that ordinary object-ID queries respect the ownership boundary. The operator changes the scope of the query rather than acquiring read permission on the victim club. The original research also confirmed count-based and nested query variants. The linked advisory carries the full scope and patch details.

Owner referenceExpected resultRecorded result
Literal private owner IDNo private-owner relation resultsNo results
Literal readable owner IDOnly that owner’s readable membersAttacker-owned relation members
Operator in place of the owner IDReject the malformed referenceIncluded readable members linked to private owners

Impact

The confidentiality loss is relationship membership: which readable items are linked to owners the caller cannot read. Depending on the application, this can reveal private group or collection membership. The returned class’s own read permissions still apply, and the finding does not establish unrestricted object reads or data modification.

The published advisory assigns 5.3 under CVSS v4.0, which is the assessment used in Overview.

Remediation

Upgrade to 8.6.105 or the patched 9.x release line identified by 9.10.5-alpha.6. Upstream validates owner references and relation keys. Its workaround rejects non-string owner IDs in a beforeFind trigger, including queries nested in logical operators.

Validation should happen before either the authorization query or the join-table lookup, so both operations receive a single, well-formed owner reference. The published workaround must inspect nested $or, $and and $nor expressions as well as the top-level query. Validating only the outermost $relatedTo leaves equivalent nested inputs untreated.

References