MODERATE

CVE-2026-59400

Spring Security ClientRegistration discloses OAuth2 Client Secret

Description

ClientRegistration, Spring Security's representation of an OAuth2/OpenID Connect client registration, includes the confidential client secret in the plaintext output of its toString() method.

Because toString() is invoked implicitly by common application and framework behaviors (parameterized logging, string concatenation, exception message construction, and similar), any code path that produces such output for a ClientRegistration instance may inadvertently disclose the client secret to a destination not intended to hold client credential material.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.security » spring-security-oauth2-client
<= 5.7.26>= 5.8.0, <= 5.8.28>= 6.4.0, <= 6.4.19>= 6.5.0, <= 6.5.12>= 7.0.0, < 7.0.9>= 7.1.0, < 7.1.3
7.0.9, 7.1.3

Blast radius

1affected artifacts
209affected versions
1,775dependent artifacts (est.)
58,907dependent versions

80% of the dependent artifacts (1,431) still pull an affected version in their latest release.

DepthDependent versions
Direct
5,234
2 hops
16,454
3 hops
21,032
4 hops
8,361
5 hops
5,638
6 hops
2,188

Most used dependents

Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.