Descrizione

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.

Testo originale del record CVE (in inglese).

Come correggere

Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.3% (percentile 20).

Versioni da aggiornare

  • Apache Software Foundation Apache WSS4J: vulnerabili le versioni dalla 4.0.0 precedenti alla 4.0.3 → aggiornare alla 4.0.3 o successiva.
  • Apache Software Foundation Apache WSS4J: vulnerabili le versioni dalla 3.0.0 precedenti alla 3.0.7 → aggiornare alla 3.0.7 o successiva.
  • Apache Software Foundation Apache WSS4J: vulnerabili le versioni precedenti alla 2.4.5 → aggiornare alla 2.4.5 o successiva.

Mitigazioni temporanee

Da applicare solo se non è possibile aggiornare subito:

  • Limitare l'accesso di rete al servizio e applicare limiti di connessione per ridurre la finestra di sfruttamento.

Verifica

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Configurazioni interessate

VendorProdottoVersioni vulnerabiliCorretta in
Apache Software Foundation Apache WSS4J ≥ 4.0.0 < 4.0.3 4.0.3
Apache Software Foundation Apache WSS4J ≥ 3.0.0 < 3.0.7 3.0.7
Apache Software Foundation Apache WSS4J < 2.4.5 2.4.5

Riferimenti