HIGH

CVE-2026-59331

Spring Security RSocket Basic Authentication Decoder Enables Denial of Service via Unbounded Allocation

Description

Spring Security's RSocket support includes BasicAuthenticationPayloadExchangeConverter, which decodes username and password metadata from a non-standard RSocket Basic Authentication frame.

The decoder read a length field from the incoming metadata and used it directly to size a memory allocation, without validating that the value was a reasonable, non-negative size relative to the data actually available. A single crafted authentication frame could therefore cause the server to attempt an extremely large allocation.

Preconditions:

The application uses Spring Security's RSocket support with an AuthenticationPayloadInterceptor that has not had its authentication converter overridden, leaving BasicAuthenticationPayloadExchangeConverter in effect as its default — as is the case, for example, with the deprecated RSocketSecurity#basicAuthentication configuration. The RSocket endpoint is reachable by the attacker.

An unauthenticated attacker who can open a connection to the RSocket endpoint can exhaust available memory on the server, resulting in a denial of service.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.security » spring-security-rsocket
>= 5.7.0, <= 5.7.26>= 5.8.0, <= 5.8.28>= 6.0.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
132affected versions
0dependent artifacts (est.)
0dependent versions

Computed from the dependency graph of build 20261127.1117 (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.