The vulnerability is an open redirect in Moodle's OAuth2 login flow. The provided commit fa1624c8c9e3efa917f0e9d2666bb59d8be2a975 directly addresses this issue. The patch modifies the public/auth/oauth2/login.php file, changing how the wantsurl parameter is handled. The vulnerable code used optional_param('wantsurl', '', PARAM_URL), which permitted redirection to any URL provided in the wantsurl parameter. The fix replaces PARAM_URL with PARAM_LOCALURL, ensuring that the redirection target is a local URL within the Moodle instance. This prevents attackers from redirecting users to malicious external websites. The vulnerable entry point is the login.php script itself, which would be visible in a runtime profile during the exploitation of this vulnerability.