Impact
A relation query using $relatedTo could disclose which objects are linked to owning objects that the client is not allowed to read, bypassing the owning-object authorization added for GHSA-wmwx-jr2p-4j4r. The client needs read access to at least one object of the owning class, and only linked objects it can already read are returned.
Patches
The owning object reference and relation key of a $relatedTo query are now validated, and queries with a non-string value are rejected.
Workarounds
Add a beforeFind trigger to classes that are queried through a Relation field and reject $relatedTo queries whose owning objectId is not a string, including when nested in $or, $and, or $nor.
References
Impact
A relation query using
$relatedTocould disclose which objects are linked to owning objects that the client is not allowed to read, bypassing the owning-object authorization added for GHSA-wmwx-jr2p-4j4r. The client needs read access to at least one object of the owning class, and only linked objects it can already read are returned.Patches
The owning object reference and relation key of a
$relatedToquery are now validated, and queries with a non-string value are rejected.Workarounds
Add a
beforeFindtrigger to classes that are queried through aRelationfield and reject$relatedToqueries whose owningobjectIdis not a string, including when nested in$or,$and, or$nor.References