Replay Attack Affecting org.springframework.ws:spring-ws-security package, versions [,4.1.4)[5.0.0-M1,5.0.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGSPRINGFRAMEWORKWS-17320735
  • published12 Jun 2026
  • disclosed10 Jun 2026
  • creditUnknown

Introduced: 10 Jun 2026

NewCVE-2026-41000  (opens in a new tab)
CWE-294  (opens in a new tab)

How to fix?

Upgrade org.springframework.ws:spring-ws-security to version 4.1.4, 5.0.2 or higher.

Overview

Affected versions of this package are vulnerable to Replay Attack due to the Wss4jSecurityInterceptor class in Wss4jSecurityInterceptor.java not consistently wiring configured Apache WSS4J ReplayCache instances into RequestData for validation-time checks. As a result, replay protections for UsernameToken nonces and creation timestamps, Timestamp elements, and SAML one-time-use semantics are ineffective even when an operator configures a replay cache on the interceptor. An attacker who captures a valid SOAP message can re-submit it and have it accepted again, re-triggering the authenticated operation.

Note:

This is only exploitable if the attacker first captures still-valid cryptographic material and replays it within the message's acceptance window against a deployment that relies on WSS4J replay detection.

Workaround

If upgrading is not possible, enable a replay cache by extending Wss4jSecurityInterceptor and overriding initializeValidationRequestData(MessageContext messageContext):

protected RequestData initializeValidationRequestData(MessageContext messageContext) {
    RequestData requestData = super.initializeValidationRequestData(messageContext);
    // Create ReplayCache according to your deployment scenario
    requestData.setNonceReplayCache(replayCache);
    requestData.setTimestampReplayCache(replayCache);
    requestData.setSamlOneTimeUseReplayCache(replayCache);
    return requestData;
}

CVSS Base Scores

version 4.0
version 3.1