The vulnerability, CVE-2026-43827, is a session fixation issue in Apache Shiro. The core of the problem is that Shiro did not invalidate an existing session after a user successfully authenticated. This allows an attacker to hijack a user's session.
My analysis began by examining the security advisory, which confirmed the nature of the vulnerability and the fixed versions (2.2.0 and 3.0.0-alpha-2). I then compared the git tags for the vulnerable version 2.1.0 and the patched version 2.2.0 to identify the exact commit that fixed the issue.
The key commit is 92eb6fb331f96a9e75363a63f41356b601cdd065, titled 'enh: destroy existing session upon login'. This commit modifies the login method within the org.apache.shiro.mgt.DefaultSecurityManager class.
The patch adds the following code to the login method:
Session existingSession = subject.getSession(false);
if (existingSession != null) {
existingSession.stop();
}
This code explicitly retrieves and stops any existing session associated with the subject before a new session is created for the successful login. The absence of this logic in vulnerable versions is the root cause of the session fixation vulnerability.
Therefore, the function org.apache.shiro.mgt.DefaultSecurityManager.login is the vulnerable function. During an exploit, this function would be called to log the user in, but it would fail to create a new session, leaving the pre-existing, attacker-controlled session active for the authenticated user.