The vulnerability exists in the instagram.js authentication adapter of Parse Server. The analysis of the provided patches in pull requests #9988 and #9989 clearly indicates that the getUserFromAccessToken function within the InstagramAdapter class was the source of the SSRF vulnerability.
The vulnerable code allowed the apiURL for the Instagram authentication check to be specified by the client within the authData object. Specifically, the line const apiURL = authData.apiURL || defaultURL; would prioritize the user-supplied URL over the hardcoded default. An attacker could exploit this by passing a malicious URL, forcing the server to make a request to an arbitrary internal or external service.
The patch remediates this by removing the client-controlled apiURL and hardcoding the legitimate Instagram Graph API endpoint (https://graph.instagram.com/). This ensures that all authentication requests are sent to the intended, trusted endpoint, eliminating the SSRF vector.