The vulnerability, identified as GHSA-mmg8-87c5-jrc2, allows an authenticated user to bypass protectedFields in Parse Server's LiveQuery subscriptions. The root cause is a type confusion vulnerability where the server does not properly validate the data type of values for logical query operators ($or, $and, $nor). The system expected an array but would also process an 'array-like' object (a plain object with numeric keys and a length property).
My analysis of the provided patches (commits f63fd1a3fe0a7c1c5fe809f01b0e04759e8c9b98 and ffad0ec6b971ee0dd9545e1bf1fb34ddebf275c2) confirms this. The changes consistently add Array.isArray() checks in multiple locations where these logical operators are processed.
The identified vulnerable functions are the key points where this lack of validation occurred:
_UnsafeRestQuery.denyProtectedFields: This is a primary security gate for protecting fields in standard queries. The missing validation allowed this gate to be bypassed.
ParseLiveQueryServer._validateQueryConstraints: This function is specific to LiveQuery and is responsible for validating the query structure. It was missing the type check for logical operators.
ParseLiveQueryServer._makeLiveQuerySubscription: This function, which sets up the subscription, contained nested logic (checkWhere and checkDepth) that also failed to validate the operator values, providing another vector for the same vulnerability.
matchesKeyConstraints: As a defense-in-depth measure, this lower-level query evaluation function was also patched to reject non-array values for logical operators, preventing the query from matching incorrectly even if other guards failed.
An attacker exploiting this vulnerability would cause these functions to be called with a malicious, non-array query object, leading to the bypass of protected field restrictions.