The vulnerability, GHSA-8cph-rgr4-g5vj, is an information disclosure issue in Parse Server's GraphQL endpoint. Unauthenticated users could send malformed queries and receive error messages containing 'Did you mean...?' suggestions. These suggestions revealed parts of the GraphQL schema, such as field names and types, which should have been protected. This bypasses existing introspection controls.
The analysis of the provided patches (for Parse Server 8 and 9) reveals that the fix involves introducing a new Apollo Server plugin called SchemaSuggestionsControlPlugin. This plugin hooks into the validationDidStart phase of the GraphQL request lifecycle.
The core of the fix is within the validationDidStart function of this new plugin. It checks if the request is from an unauthenticated user and if public introspection is disabled. If these conditions are met, it registers a callback that sanitizes the validationErrors array, stripping the 'Did you mean...?' suggestions from the error messages before they are sent back to the client.
The function ParseGraphQLServer._createApolloServer was also identified as relevant because it's where the new SchemaSuggestionsControlPlugin is registered, making the fix effective. The vulnerability was essentially a missing piece of security logic in the server's configuration, which this function is responsible for.
Therefore, the vulnerable function is conceptually the absence of the logic now present in SchemaSuggestionsControlPlugin.requestDidStart.validationDidStart. During exploitation, the GraphQL validation logic would execute without the sanitization provided by this new function, leading to the information leak. A runtime profiler would show activity within the GraphQL request handling and validation pipeline, and the fix is applied directly within this path.