CVE-2021-34428: SessionListener can prevent a session from being invalidated breaking logout
3.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.6523%
CWE
Published
6/23/2021
Updated
2/1/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.eclipse.jetty:jetty-server | maven | <= 9.4.40 | 9.4.41 |
org.eclipse.jetty:jetty-server | maven | >= 10.0.0, <= 10.0.2 | 10.0.3 |
org.eclipse.jetty:jetty-server | maven | >= 11.0.0, <= 11.0.2 | 11.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper exception handling during session invalidation. The Session.invalidate()
method and its call stack (including SessionHandler.doInvalidate()
) are responsible for: 1) Notifying SessionListeners
2) Removing the session ID from the session manager. If any SessionListener
's sessionDestroyed()
method throws an exception before the session ID removal occurs, the invalidation process aborts prematurely. The patched versions (9.4.41+/10.0.3+/11.0.3+) would contain try-catch blocks around listener notifications to ensure session ID removal happens regardless of listener exceptions. These functions appear in stack traces during logout attempts when listeners throw exceptions.