The vulnerability, described as an 'elevated session bypass', stems from several open redirect flaws within the Statamic CMS control panel. The primary and most critical flaw exists in the getAuthExceptionRedirectUrl method, located in the RendersControlPanelExceptions trait. This method is invoked when an AuthorizationException is thrown, a common occurrence when a user attempts to access a resource requiring higher privileges or an 'elevated session' without proper authorization. The vulnerable version of the code would redirect the user to the URL specified in the Referer header without checking if it was an external site. An attacker could exploit this by tricking a logged-in user into clicking a specially crafted link. This link would point to a protected area of the control panel but include a Referer header pointing to an attacker-controlled domain. The resulting redirect could be used to bypass the password confirmation step required for elevating the user's session, thus leading to privilege escalation.
The same security patch also addresses two other open redirect vulnerabilities in the FormController. The formSuccess and formFailure methods were found to blindly trust the _redirect and _error_redirect parameters in form submissions, respectively. These could be used to redirect users to malicious sites after or during form submission. While these are significant vulnerabilities in their own right, the 'elevated session bypass' aspect is most directly associated with the flaw in the exception handling logic.