Every CVE Search/ Get API key

CVE-2023-20862

Spring Security logout not clearing security context

6.3 MediumFix available

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
Low

Exploit likelihood

0.65%Up 0.6 points since Apr 20, 2023
90%50%10%1%

What each source reports

NVD Score used 6.3

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Record
CVE-2023-20862
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Weakness
CWE-459
Updated
2026-11-02
CVE List 6.3

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Record
CVE-2023-20862
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Weakness
CWE-459
Updated
2026-11-02
EUVDEUVD-2023-1423 6.3

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Record
EUVD-2023-1423
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-03
GitHub AdvisoriesGHSA-x873-6rgc-94jc 6.3

Spring Security logout not clearing security context

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Record
GHSA-x873-6rgc-94jc
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Weakness
CWE-459
Updated
2026-11-02
OSV 6.3

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Record
CVE-2023-20862
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVGHSA-x873-6rgc-94jc 6.3

Spring Security logout not clearing security context

In Spring Security, versions 5.7.x prior to 5.7.8, versions 5.8.x prior to 5.8.3, and versions 6.0.x prior to 6.0.3, the logout support does not properly clean the security context if using serialized versions. Additionally, it is not possible to explicitly save an empty security context to the HttpSessionSecurityContextRepository. This vulnerability can keep users authenticated even after they performed logout. Users of affected versions should apply the following mitigation. 5.7.x users should upgrade to 5.7.8. 5.8.x users should upgrade to 5.8.3. 6.0.x users should upgrade to 6.0.3.

Record
GHSA-x873-6rgc-94jc
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Weakness
CWE-459
Updated
2026-11-02
OSVRHSA-2024:0778 9.8

Red Hat Security Advisory: Jenkins and Jenkins-2-plugins security update

Record
RHSA-2024:0778
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVROOT-APP-MAVEN-CVE-2023-20862 No score

CVE-2023-20862 in io.root.org.springframework.security:spring-security-core - Patched by Root

Root has patched CVE-2023-20862 in the io.root.org.springframework.security:spring-security-core package for Root:Maven. Multiple fixed versions available.

Record
ROOT-APP-MAVEN-CVE-2023-20862
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.springframework.security:spring-security-core
Maven
5.7.0 up to 5.7.8
5.7.8
org.springframework.security:spring-security-core
Maven
5.8.0 up to 5.8.3
5.8.3
org.springframework.security:spring-security-core
Maven
6.0.0 up to 6.0.3
6.0.3
org.springframework.security:spring-security-core
Maven
5.7.0 up to 5.7.8, plus listed versions
5.7.15.7.25.7.35.7.45.7.55.7.65.7.7
5.7.8
org.springframework.security:spring-security-core
Maven
5.8.0 up to 5.8.3, plus listed versions
5.8.15.8.2
5.8.3
org.springframework.security:spring-security-core
Maven
6.0.0 up to 6.0.3, plus listed versions
6.0.16.0.2
6.0.3
jenkins-2-plugins
Red Hat:ocp_tools:4.12::el8
before 0:4.12.1706515741-1.el8
0:4.12.1706515741-1.el8
jenkins
Red Hat:ocp_tools:4.12::el8
before 0:2.426.3.1706515686-3.el8
0:2.426.3.1706515686-3.el8
io.root.org.springframework.security:spring-security-core
Root:Maven
before 5.7.1-root.io.1
5.7.1-root.io.15.7.3-root.io.15.7.1-root.io.25.7.1-root.io.35.7.1-root.io.45.7.1-root.io.5
org.springframework.security:spring-security-core
Root:Maven
before 5.7.1-aikido.3
5.7.1-aikido.35.7.1-aikido.45.7.1-aikido.5

History

History
RecordedChangedSources
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2023-20862 is a medium vulnerability (CVSS 6.3) in Spring Security, published April 19, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.65%, the 51st percentile. Fixed in org.springframework.security:spring-security-core 5.7.8.

References

Show 148 moreShow less
MoveEnter Open