The vulnerability lies in the sendResetLinkEmail function within the ForgotPasswordController. The provided patches clearly show that this function was modified to add validation for the _reset_url parameter. Before the patch, the application did not properly validate this URL, or in some versions, did not validate it at all. This allowed an attacker to inject a URL to a malicious site. When a legitimate user requested a password reset, the email they received would contain a link pointing to the attacker's site, but with the user's valid password reset token appended. If the user clicked this link, the attacker could capture the token and use it to reset the user's password, thereby gaining control of the account. The identified vulnerable function, Statamic\Http\Controllers\ForgotPasswordController::sendResetLinkEmail, is the exact location in the code where this malicious input is processed and used to construct the password reset link.