The vulnerability exists across the Google, Apple, and Facebook authentication adapters in Parse Server. The root cause is the improper validation of the JSON Web Token (JWT) 'audience' (aud) claim. In all three adapters, the verifyIdToken function was responsible for validating the identity token provided by the authentication provider.
For the Google and Apple adapters, the code did not enforce the presence of the clientId in the server configuration. When this value was missing, the check for the JWT's audience was silently skipped. This allowed an attacker with a valid JWT from any application to authenticate as a user on the target Parse Server, as the server failed to verify that the token was intended for its specific application clientId.
For the Facebook adapter's 'Limited Login' flow, the issue was that the code was written to check for clientId but the correct configuration for this flow is appIds. The code never passed the appIds to the JWT verification library. This resulted in the audience check always being skipped, regardless of the server's configuration.
The patches address these issues by adding strict checks to ensure that clientId (for Google/Apple) and appIds (for Facebook) are present in the configuration. If they are missing, the authentication process now fails with an error. Furthermore, the Facebook adapter was corrected to use appIds for audience validation, ensuring that the JWT is validated against the correct application identifier(s).