CVE-2026-74762: Apache Shiro keeps the old session alive when it restores a user from a RememberMe cookie

ByLinuxtastic

December 1, 2026 #Apache Shiro, #CVE

Apache Shiro’s “Remember me” feature lets a returning user skip the login form: a cookie carries an encrypted copy of their identity, and on the next visit Shiro rebuilds the subject from it. In every release through 3.0.0 that rebuild left the existing session in place with its existing ID, and Shiro also accepted a session ID from the request URL even when URL rewriting had been switched off. Together those two behaviours are a session fixation: an attacker who gets a victim to open a link carrying a session ID the attacker chose, and who waits for the RememberMe restore to happen in that session, ends up holding an authenticated session. The record says the flaw applies “only when RememberMe functionality is enabled”, and Apache scores it 5.9 under CVSS 4.0. Upgrade Shiro to 3.0.1 or later, and until then do not offer “Remember me” on the login form.

CVE-2026-74762 at a glance.

ComponentApache Shiro, the shiro-core and shiro-web modules: the RememberMe subject restore in the security manager and the session ID lookup in the web subject factory. Applications that never enable RememberMe are outside the described flaw
Affected versionsevery Shiro release through 3.0.0 (org.apache.shiro:shiro-core and shiro-web before 3.0.1, per the Apache CNA record), “only when RememberMe functionality is enabled”
Fixed inShiro 3.0.1 (released 24 August 2026 per the project’s news page; 3.0.2 of 8 November is the current release), which invalidates the existing session and creates a new one with a new ID on a RememberMe restore, and ignores URL session IDs when URL rewriting is disabled. No distribution ships a current Shiro: Debian’s shiro package is 1.3.2 and marked vulnerable and unfixed
SeverityApache (CNA) CVSS 4.0 5.9 Medium (AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N; the AT:P is RememberMe being enabled, the UI:A is the victim opening the attacker’s link), CWE-384 (session fixation); Apache’s own label is Medium; no CVSS 3.x score; NVD Received with the CNA score only. Ubuntu Medium; Debian no urgency set; Red Hat and SUSE have no page
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30). EPSS 0.00395 (36th percentile) on 1 December 2026
Who is exposedJava web applications on Linux that use Shiro’s RememberMe (a rememberMe checkbox on the login form, or the rememberMe parameter accepted by the authc filter) and whose users can be sent a link. The attacker needs no account: the payoff is the victim’s authenticated session, which is why the vector carries high confidentiality impact. An application that has RememberMe off, or that only ever restores subjects from the server-side session, is outside the described flaw
PublishedAnnounced on oss-security 14 November 2026, CVE record 16 November 2026; this page built 1 December 2026, last updated 1 December 2026

What it is

Session fixation is the attack where the attacker, not the server, chooses the session ID. The classic defence is to issue a fresh ID at the moment a session changes from anonymous to authenticated, so that whatever ID the attacker planted beforehand is worthless afterwards. Shiro does that on a normal login. The RememberMe path is a second way a session becomes authenticated, and the record says that on that path “the existing session is not invalidated, nor is a new session created with a new ID”: the subject is restored from the cookie into whatever session the request already carried.

The second half of the record is what makes the first half reachable. A session ID normally arrives in a cookie, which an attacker on another site cannot set, but Shiro also read it from the request URL, and “session IDs were accepted from the request URL even when session ID URL rewriting was disabled”. A link such as https://app.example/?JSESSIONID=attacker-chosen therefore attached the attacker’s ID to the victim’s request. When the victim’s RememberMe cookie then restored their identity, it did so inside a session the attacker already knew the ID of, and the attacker could present that ID as their own. The UI:A in the CVSS 4.0 vector is the victim following the link; the AT:P is RememberMe being on at all.

The 3.0.1 fix, as the record describes it, does the two obvious things: on a RememberMe restore it invalidates the current session and starts a new one with a new ID, and it stops reading session IDs from the URL when URL rewriting is off. The finder is n0mi1k and the remediation was developed by Lenny Primak, who posted the announcement. 3.0.1 shipped with two other fixes the project lists on its security page, CVE-2026-129349, a critical flaw in which DefaultLdapRealm credential caching accepted any password after a first successful login, and CVE-2026-58301, a server-side request in the Jakarta EE module, so an application still on 3.0.0 has more than this one reason to move. Apache’s announcement thread on lists.apache.org renders only as an application shell to automated readers; the facts above are from the CVE record, the oss-security copy of the announcement and the project’s security reports page.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. Shiro is a Maven dependency, so the rows that matter are the last two.

DistributionStatusFixed package
AlpineNot consulted for this page; Alpine does not package Shiro—
Debianshiro vulnerable in bookworm (1.3.2-5), trixie, forky and sid (1.3.2-6); source “(unfixed)”; Debian bug 1154077. The 1.3.2 package exists for build dependencies rather than for deploymentnothing on 1 December 2026
UbuntuPriority Medium; shiro “Needs evaluation” on every release from 16.04 to 26.10; description not yet filled innothing on 1 December 2026
RHEL, Rocky, Alma, CentOS StreamNo page (client error on 1 December); Red Hat does not ship Shiro—
openSUSE/SLENo page (client error on 1 December); SUSE does not ship Shiro—
Maven Central (org.apache.shiro), application bundles, containers with a vendored jarThe upstream release applies; every application that depends on shiro-core or shiro-web below 3.0.1 needs a rebuild3.0.1 or later of both modules

How to check

Three questions, in order: which Shiro the application ships, whether RememberMe is enabled, and whether session IDs can arrive in URLs. The second one decides whether the application was ever exposed; the third tells you how easy the fixation was to plant.

# 1. the Shiro jars an application actually loads (3.0.1 or later is fixed)
for p in $(pgrep -x java); do tr '\0' '\n' < /proc/$p/cmdline | grep -oE '[^:]*shiro-(core|web)[^:]*\.jar' | sed "s/^/pid $p: /"; done
find / -name 'shiro-*.jar' 2>/dev/null | grep -vE '/\.m2/' | sort -u
for w in /opt/*/*.war /opt/*/*.jar; do unzip -l "$w" 2>/dev/null | grep -oE 'shiro-(core|web)-[0-9][^ ]*\.jar' | sed "s|^|$w: |"; done 2>/dev/null

# 2. is RememberMe in use? the login form parameter, the ini/Spring wiring, or code that calls it
grep -rnE 'rememberMe|RememberMeManager|isRemembered|rememberMeParam' --include='*.ini' --include='*.xml' --include='*.java' --include='*.html' --include='*.jsp' --include='*.properties' /path/to/src /etc/shiro* 2>/dev/null | head -20
grep -rn 'rememberMe' /opt/*/webapps/*/WEB-INF/shiro.ini 2>/dev/null

# 3. do session IDs arrive in URLs? (3.0.1 ignores them when rewriting is off; older builds did not)
grep -rn 'sessionIdUrlRewritingEnabled' --include='*.ini' --include='*.xml' /path/to/src /etc/shiro* 2>/dev/null
grep -chE 'JSESSIONID=|;jsessionid=' /var/log/nginx/access.log /var/log/httpd/access_log /opt/*/logs/*access* 2>/dev/null

An application on 3.0.1 or later is done. One below 3.0.1 with nothing in step 2 never enabled RememberMe and the record does not describe it. One with RememberMe wired in has been exposed for as long as it has run; step 3 says whether URL session IDs have been reaching it, and a non-zero count in the access logs is worth a look for IDs that appear on more than one client address, which is what a planted session looks like after the fact. Shiro does not log a RememberMe restore as such, so the application’s own audit trail is the better record.

How to fix it

Bump both Shiro modules to 3.0.1 or later (3.0.2 is current and closes seven further issues), rebuild, redeploy and restart; a running JVM keeps the old jar until it is restarted and a container keeps it until the image is rebuilt. Keep shiro-core and shiro-web on the same version.

# Maven: in the pom, then rebuild
#   <shiro.version>3.0.2</shiro.version>
mvn -q versions:use-dep-version -Dincludes=org.apache.shiro:* -DdepVersion=3.0.2 -DforceVersion=true
mvn -q dependency:tree | grep shiro        # every org.apache.shiro line should read 3.0.2
# Gradle: implementation("org.apache.shiro:shiro-core:3.0.2") and "org.apache.shiro:shiro-web:3.0.2"
systemctl restart myapp.service            # or redeploy the war / rebuild the image

The vendor names no workaround beyond the upgrade. The precondition the record gives is RememberMe being enabled, so the interim measure that follows from it is to stop offering it: remove the checkbox from the login form and, because the authc filter honours the rememberMe request parameter whether or not the form shows it, refuse that parameter at the proxy. That is our reading of the record, not a vendor instruction, and it costs users a login per visit. What not to do: do not rely on sessionIdUrlRewritingEnabled = false on an old build, because the record’s second finding is precisely that the setting was not honoured for incoming IDs; and do not assume the application is safe because sessions time out quickly, since the attacker uses the session while the victim does.

# interim, at an nginx front end: drop RememberMe and URL session IDs before Shiro sees them
# (an attacker can still post the parameter to the app directly if the app is reachable without the proxy)
if ($args ~* "(^|&)rememberMe=") { return 400; }
if ($args ~* "(^|&)JSESSIONID=")  { return 400; }
if ($request_uri ~* ";jsessionid=") { return 400; }

Those rules belong in the server or location block that fronts the application, and the POST body is not covered by them, so they reduce the surface rather than close it. The upgrade closes it.

Sources

  • CVE-2026-74762 at CVE.org — the Apache CNA record (16 November 2026): the description, the two affected modules before 3.0.1, CVSS 4.0 5.9, CWE-384, the 3.0.1 fix and the credits
  • Apache announcement on oss-security — Lenny Primak’s mail of 14 November 2026 with the advisory text, the affected artefacts and the mitigation
  • Apache Shiro security reports — the entry for this CVE (Medium, through 3.0.0 with RememberMe enabled, credit n0mi1k) and the other issues fixed in 3.0.1 and 3.0.2
  • Apache Shiro news and download page — 3.0.1 available 24 August 2026; 3.0.2 the current stable release
  • Apache announcement thread — the vendor advisory named in the record; renders as an application shell to automated readers
  • NVD entry — Received; published 16 November; the CNA’s CVSS 4.0 vector and CWE-384; no CVSS 3.x score, no CPEs yet
  • Distribution trackers: Debian (shiro 1.3.2 vulnerable, unfixed, bug 1154077) · Ubuntu (Medium, needs evaluation) · Red Hat and SUSE (no page; Shiro not shipped)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00395 on 1 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.