The vulnerability, as described, is a cache key collision in ConfigKeyCache when resolving function-typed master keys. The provided commit f92a9ef5246d57e51696bd881a15f3b133b2bb50 directly addresses this issue in Parse-Dashboard/app.js.
The analysis of the patch shows two key modifications:
-
In an anonymous async function responsible for preparing the list of applications a user has access to, the call to ConfigKeyCache.get was updated. The original code (app.masterKey = await ConfigKeyCache.get(app.appId, 'masterKey', ...);) used a hardcoded cache key, which is the root cause of the vulnerability. The patch makes the cache key dependent on whether the access is read-only (const cacheKey = matchingAccess.readOnly ? 'readOnlyMasterKey' : 'masterKey';). This anonymous function is considered a vulnerable function.
-
The commit also refactors the /apps/:appId/agent endpoint into a new agentHandler function. Inside this new function, logic for resolving function-typed master keys is introduced, and it correctly uses distinct cache keys. This indicates that while the agent endpoint might not have been vulnerable to this specific issue before, the developer proactively applied the correct pattern during a refactoring effort that addressed other security concerns on that endpoint.
Both identified locations in the code were susceptible to or fixed for the same underlying logical flaw. A runtime profile during exploitation would show calls to ConfigKeyCache.get originating from these parts of the app.js module.