Integer Overflow or WraparoundAffected versions of this package are vulnerable to Integer Overflow or Wraparound via the getBytes method in DERDecoder. An unauthenticated attacker can send a SOAP message containing an X.509 certificate whose SubjectKeyIdentifier declares a length of 0x7FFFFFFF; the vulnerable check pos + length > arr.length can overflow, allowing an eleven-byte extension to trigger a 2 GB allocation during signature key-reference resolution, before the message is authenticated. Repeated requests can exhaust server memory and deny service to users.
How to fix Integer Overflow or Wraparound? Upgrade org.apache.wss4j:wss4j-ws-security-common to version 2.4.4, 3.0.6, 4.0.2 or higher.
| [,2.4.4)[3.0.0,3.0.6)[4.0.0,4.0.2) |
Improper Validation of Specified Index, Position, or Offset in InputAffected versions of this package are vulnerable to Improper Validation of Specified Index, Position, or Offset in Input through the DerivedKeyTokenInputHandler and DerivedKeyUtils.deriveKey in its StAX and common derived-key processing. An attacker can send a crafted WS-Security message with extreme derived-key length or offset values, causing excessive CPU and memory use during key derivation and disrupting message processing.
Notes
- At the StAX entry point, the attacker supplies the DerivedKeyToken’s
wsc:Length and wsc:Offset; the handler converts both with BigInteger.intValue() before derivation, so oversized XML integers are narrowed to signed 32-bit values and can wrap.
How to fix Improper Validation of Specified Index, Position, or Offset in Input? Upgrade org.apache.wss4j:wss4j-ws-security-common to version 2.4.4, 3.0.6, 4.0.2 or higher.
| [,2.4.4)[3.0.0,3.0.6)[4.0.0,4.0.2) |