
Cloud Vulnerability DB
A community-led vulnerabilities database
ConcatKDF::generate(), the key derivation function behind the ECDH-ES and ECDH-SS key agreement algorithms, computes a single SHA-256 round and truncates it to the requested length. It never returns more than 32 bytes. The Concat KDF that RFC 7518 (section 4.6.2) takes from NIST SP 800-56A concatenates as many rounds as needed to reach the requested key length.
In direct key agreement mode ("alg": "ECDH-ES"), the derived key is the content encryption key (CEK). The AES-CBC-HMAC-SHA2 algorithms split it into MAC_KEY followed by ENC_KEY (RFC 7518, section 5.2.2.1). With a 32-byte CEK:
JWE produced with alg set to ECDH-ES and enc set to A256CBC-HS512 (content readable by anyone) or A192CBC-HS384 (64-bit content key), whatever the curve. This was measured with P-256, P-521 and X25519. The non-registered ECDH-SS algorithm shares the same derivation.
Not affected: A128CBC-HS256, A128GCM, A192GCM, A256GCM, and the key wrapping variants ECDH-ES+A128KW, ECDH-ES+A192KW and ECDH-ES+A256KW. They all request 256 bits or less, which a single round covers.
The defect has been present since the first release of the library.
ConcatKDF::generate() now concatenates as many SHA-256 rounds as the requested length needs. JWEBuilder and JWEDecrypter now check the length of a key obtained by key agreement, as they already did for wrapped and encrypted keys.
Compatibility. The fix changes the key derived for ECDH-ES with A192CBC-HS384 and A256CBC-HS512:
Until you upgrade, encrypt with ECDH-ES and A128CBC-HS256 or A128GCM/A192GCM/A256GCM, or use ECDH-ES+A128KW/ECDH-ES+A192KW/ECDH-ES+A256KW. Consider the content of every token already produced with ECDH-ES and A256CBC-HS512 as disclosed, and the content of the tokens produced with ECDH-ES and A192CBC-HS384 as weakly protected.
Reported by Jeroen Robben.
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."