CVE-2026-115690

Apache WSS4J: Replay protection bypassed by concurrent copies of a message

Published Nov 16, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
Apache WSS4J remembers the UsernameToken Nonce, the Timestamp and signature of a signed message, and the ID of a SAML 2.0 "OneTimeUse" assertion, so that a captured message cannot be accepted twice. It checked whether a value had already been seen, validated the message, and only then remembered the value, as two separate steps. If several copies of the same message were processed at the same time, they could all pass the check before any of them was remembered, and all be accepted. An attacker who obtained a valid message before the recipient first processed it could send several copies at once, so that the same authenticated request was executed more than once. Where a UsernameToken is not bound to the message by a signature, the copies could carry different message bodies. The attacker needs to obtain the message while it is still in transit; a message captured after it has been accepted cannot be replayed. Affects deployments with a replay cache configured, as Apache CXF has by default. The value is now checked and remembered in a single atomic step. Custom ReplayCache implementations should override the new ReplayCache.addIfAbsent method with an operation that is atomic in their underlying store. Users are recommended to upgrade to versions 4.0.3 or 3.0.7 or 2.4.5, which fix this issue.

Analysis

AI-generated

Technical impact

Apache WSS4J implements WS‑Security for Java applications and protects against replay attacks by recording identifiers such as the nonce, timestamp, signature, and SAML OneTimeUse assertion of each signed message. In vulnerable releases, the library performed a two‑step process: it first checked whether an identifier had already been seen and only after that verification did it record the identifier. If several identical copies of a message were processed concurrently, each copy could pass the check before any were recorded, allowing all copies to be accepted. Consequently, an attacker who captured a valid authenticated request while it was in transit could send multiple copies simultaneously, causing the same operation to be executed repeatedly or with altered content. The weakness is identified as a CWE‑367 Concurrent Race Condition.

Affected Systems

The problem influences all Apache WSS4J versions that employ the replay cache, specifically releases older than 4.0.3, 3.0.7, and 2.4.5. Deployments that use Apache CXF are especially affected because CXF has the replay cache enabled by default. Applications that incorporate a custom ReplayCache implementation that does not override the updated addIfAbsent method with an atomic operation are also vulnerable.

Risk and Exploitability

No EPSS score is available and the issue is not listed in the CISA KEV catalog, indicating that public exploitation has not yet been observed. The attack requires interception of a legitimate WS‑Security message and the ability to transmit several copies at once, a scenario achievable by an adversary with network visibility between client and server. The lack of an atomic check‑and‑record mechanism makes the exploit deterministic once the timing condition is met. The vulnerability can result in repeated authenticated actions and potential data corruption, but severity assessment must rely on organization‑specific risk factors and the presence or absence of mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Apache WSS4J to version 4.0.3, 3.0.7, or 2.4.5, which implement an atomic replay cache check and record, mitigating the CWE‑367 vulnerability.
  • If a custom ReplayCache is used, replace the new ReplayCache.addIfAbsent method with an implementation that records the identifier and checks for duplicates in a single atomic operation on the underlying store.
  • Ensure that UsernameToken usage is bound by a signature or otherwise tightly coupled to the message, and verify that the replay cache is enabled and functioning in the deployment configuration.

Generated by OpenCVE AI on November 16, 2026 at 12:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Apache
Apache wss4j
Vendors & Products Apache
Apache wss4j
Type Values Removed Values Added
Description Apache WSS4J remembers the UsernameToken Nonce, the Timestamp and signature of a signed message, and the ID of a SAML 2.0 "OneTimeUse" assertion, so that a captured message cannot be accepted twice. It checked whether a value had already been seen, validated the message, and only then remembered the value, as two separate steps. If several copies of the same message were processed at the same time, they could all pass the check before any of them was remembered, and all be accepted. An attacker who obtained a valid message before the recipient first processed it could send several copies at once, so that the same authenticated request was executed more than once. Where a UsernameToken is not bound to the message by a signature, the copies could carry different message bodies. The attacker needs to obtain the message while it is still in transit; a message captured after it has been accepted cannot be replayed. Affects deployments with a replay cache configured, as Apache CXF has by default. The value is now checked and remembered in a single atomic step. Custom ReplayCache implementations should override the new ReplayCache.addIfAbsent method with an operation that is atomic in their underlying store. Users are recommended to upgrade to versions 4.0.3 or 3.0.7 or 2.4.5, which fix this issue.
Title Apache WSS4J: Replay protection bypassed by concurrent copies of a message
Weaknesses CWE-367
References
Weaknesses
  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Nov 16, 2026, 9:54 AM
Reserved
Oct 23, 2026, 9:26 AM
Status
Received
Published
Nov 16, 2026, 10:16 AM
Modified
Nov 16, 2026, 10:16 AM