Skip to content

SessionListener can prevent a session from being invalidated breaking logout

Low severity GitHub Reviewed Published Jun 22, 2021 in jetty/jetty.project • Updated Feb 1, 2023

Package

maven org.eclipse.jetty:jetty-server (Maven)

Affected versions

<= 9.4.40
>= 10.0.0, <= 10.0.2
>= 11.0.0, <= 11.0.2

Patched versions

9.4.41
10.0.3
11.0.3

Description

Impact

If an exception is thrown from the SessionListener#sessionDestroyed() method, then the session ID is not invalidated in the session ID manager. On deployments with clustered sessions and multiple contexts this can result in a session not being invalidated. This can result in an application used on a shared computer being left logged in.

There is no known path for an attacker to induce such an exception to be thrown, thus they must rely on an application to throw such an exception. The OP has also identified that during the call to sessionDestroyed, the getLastAccessedTime() throws an IllegalStateException, which potentially contrary to the servlet spec, so applications calling this method may always throw and fail to log out. If such an application was only tested on a non clustered test environment, then it may be deployed on a clustered environment with multiple contexts and fail to log out.

Workarounds

The application should catch all Throwables within their SessionListener#sessionDestroyed() implementations.

References

@waynebeaton waynebeaton published to jetty/jetty.project Jun 22, 2021
Published by the National Vulnerability Database Jun 22, 2021
Reviewed Jun 22, 2021
Published to the GitHub Advisory Database Jun 23, 2021
Last updated Feb 1, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Physical
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

EPSS score

0.152%
(52nd percentile)

Weaknesses

CVE ID

CVE-2021-34428

GHSA ID

GHSA-m6cp-vxjx-65j6

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.