CVE-2026-74762

Authorization Bypass
Affects
Apache Shiro
in
Apache Shiro
No items found.
Versions
<3.0.1

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Apache Shiro is an open-source Java security framework that performs authentication, authorization, cryptography, and session management for applications ranging from small mobile apps to large web and enterprise systems. It exposes a single Subject-centric API that applications use to log users in, check roles and permissions, and manage sessions independently of any servlet or EJB container, and integrates with common Java stacks through modules such as shiro-web, shiro-spring, and shiro-guice.

An authorization bypass vulnerability (CVE-2026-74762) has been identified in Apache Shiro's RememberMe and web session handling, which allows attackers to hijack a user's session through session fixation. When Shiro restores a user from a "Remember me" cookie, it keeps the existing session and session ID instead of issuing a new one, and it also accepts session IDs from the request URL even when session ID URL rewriting is disabled.

Per OWASP: Session Fixation is an attack that permits an attacker to hijack a valid user session. The attack explores a limitation in the way the web application manages the session ID, more specifically the vulnerable web application. When authenticating a user, it doesn't assign a new session ID, making it possible to use an existent session ID.

This issue affects all versions of Apache Shiro prior to 3.0.1, when RememberMe functionality is enabled.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.apache.shiro:shiro-core and org.apache.shiro:shiro-web packages in all versions of Apache Shiro prior to 3.0.1.

On each request, DefaultSecurityManager.createSubject resolves the session referenced by the request, then resolves the principals. If the request carries no authenticated identity, resolvePrincipals falls back to getRememberedIdentity and places the principals decoded from the "Remember me" cookie into the context. The subject is then saved into whatever session was resolved, without invalidating that session or issuing a new session ID:

public Subject createSubject(SubjectContext subjectContext) {
    SubjectContext context = copy(subjectContext);
    context = ensureSecurityManager(context);
    context = resolveSession(context);
    context = resolvePrincipals(context);

    Subject subject = doCreateSubject(context);

    save(subject);

    return subject;
}

Because a session ID that existed before the user was identified stays valid after the remembered identity is stored in it, an attacker who plants a known session ID in the victim's browser can reuse that same ID once the victim's "Remember me" cookie has been applied, and act as the victim.

Planting the session ID is made easier by DefaultWebSessionManager.getReferencedSessionId. When no session ID cookie is present, it falls back to the ;JSESSIONID= URI path segment parameter and then to the query string, and it does so unconditionally, even when the application has disabled session ID URL rewriting:

String id = getSessionIdCookieValue(request, response);
if (id != null) {
    request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_SOURCE,
            ShiroHttpServletRequest.COOKIE_SESSION_ID_SOURCE);
} else {
    //not in a cookie, or cookie is disabled - try the request URI as a fallback (i.e. due to URL rewriting):
    id = getUriPathSegmentParamValue(request, ShiroHttpSession.DEFAULT_SESSION_ID_NAME);

    if (id == null && request instanceof HttpServletRequest) {
        String name = getSessionIdName();
        HttpServletRequest httpServletRequest = WebUtils.toHttp(request);
        String queryString = httpServletRequest.getQueryString();
        if (queryString != null && queryString.contains(name)) {
            id = request.getParameter(name);
        }
        ...
    }
}

An attacker can therefore send the victim a link that carries an attacker-chosen session ID in the URL. If the victim's browser holds a valid "Remember me" cookie, Shiro binds the victim's remembered identity to the attacker's session, and the attacker can then use that session ID to access the application as the victim.

Mitigation

Apache Shiro 1.x is End-of-Life and no longer receives open-source updates to address this issue. The final 1.x release was 1.13.0; as of February 28, 2024, Shiro v1 was superseded by v2.

Users of the affected components should apply one of the following mitigations:

  • Upgrade Apache Shiro to a currently supported release line that contains the fix, first shipped upstream in Apache Shiro 3.0.1 (requires Java 17+).
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

  • n0mi1k (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-74762
PROJECT Affected
Apache Shiro
Versions Affected
<3.0.1
NES Versions Affected
Published date
November 18, 2026
≈ Fix date
November 18, 2026
Category
Authorization Bypass
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Apache Shiro
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.