Executive brief
The Netty OHTTP HPKE codec library exposes complete HPKE private key bytes in application logs when key objects are logged or exceptions are raised. Applications using this library risk permanent exposure of cryptographic keys in log files and telemetry systems. Anyone with access to those logs can recover private keys and decrypt all OHTTP messages encrypted to that key or forge authentication on future messages.
Technical details
The vulnerability is an information disclosure flaw (CWE-200, CWE-312, CWE-532) in the BoringSSL HPKE codec classes. The root cause spans three code paths: (1) BoringSSLAsymmetricCipherKeyPair.toString() concatenates the private key parameter object, which then calls (2) BoringSSLAsymmetricKeyParameter.toString() to render the full byte array via Arrays.toString(bytes), regardless of the isPrivate flag; (3) EVP_HPKE_KEY_init_or_throw() includes Arrays.toString(privateKeyBytes) in IllegalArgumentException messages on key initialization failure. No authentication or special privileges are required; the exposure occurs automatically when logging frameworks call toString() on key pair objects or when exceptions containing key bytes are logged. An attacker with read access to application logs can extract and reuse the private key material indefinitely. Patch 0.0.23.Final redacts private key material in toString() methods and error messages.
Affected products
- Netty netty-incubator-codec-ohttp-hpke-classes-boringssl <= 0.0.22.Final
Timeline
- 2026-07-12: disclosed: Published in GitHub Advisory Database
- 2026-08-20: advisory: Updated advisory with full details
- 2026-07-12: patched: Fixed in version 0.0.23.Final