The vulnerability lies in the getStore function within src/triggers.js of the parse-server package. This function is used to look up and retrieve Cloud Functions. The vulnerability allows an attacker to bypass Cloud Function validators by crafting a special path in the URL that includes .prototype.constructor. The getStore function would then traverse the prototype chain of the Cloud Function object, leading to the validator being ignored.
The patch addresses this by adding a check within the getStore function. The line if (!store || Object.getPrototypeOf(store) !== null) ensures that during the lookup process, the code does not traverse into the prototype of an object. If it detects that it's about to access a property from the prototype chain, it stops and returns an empty result, effectively preventing the validator bypass. The provided commit patches clearly show this change being applied to the getStore function, confirming it as the location of the vulnerability and the fix.