# CVE-2026-61798: Netty netty-incubator-codec-ohttp HPKE private key exposure in toString()

Source: https://junglewise.ai/threats/cve-2026-61798-netty-netty-incubator-codec-ohttp-hpke-private-key-exposure-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-20. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-61798 · Severity: high · CVSS 8.1 · Published 2026-08-20

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.

Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [Netty](https://junglewise.ai/threats/vendors/netty).

## Quick answers

**Is CVE-2026-61798 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-61798 being exploited in the wild.

**How severe is CVE-2026-61798?** High severity, with a CVSS score of 8.1, published 20 August 2026.

**Which products and versions are affected?** io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl (Maven) <= 0.0.22.Final, ECOSYSTEM:introduced=0,fixed=0.0.23.Final; Netty-Incubator-Codec-Ohttp-Hpke-Classes-Boringssl <= 0.0.22.Final.

**Is there a fix for CVE-2026-61798?** Yes. io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl (Maven): upgrade to 0.0.23.Final or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-61798 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-61798?** Check whether you run io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl (Maven) or Netty-Incubator-Codec-Ohttp-Hpke-Classes-Boringssl at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl (Maven): upgrade to 0.0.23.Final or later

  ```sh
  # set io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl to 0.0.23.Final in your pom.xml or build.gradle
  ```


## 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

## Identifiers

- CVE-2026-61798
- GHSA-2mc4-j865-9q4r

## 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

## References

- [https://api.github.com/users/sondt99](https://api.github.com/users/sondt99)
- [https://github.com/sondt99](https://github.com/sondt99)
- [https://api.github.com/users/sondt99/gists%7B/gist_id%7D](https://api.github.com/users/sondt99/gists%7B/gist_id%7D)
- [https://api.github.com/users/sondt99/repos](https://api.github.com/users/sondt99/repos)
- [https://avatars.githubusercontent.com/u/87920408?v=4](https://avatars.githubusercontent.com/u/87920408?v=4)
- [https://api.github.com/users/sondt99/events%7B/privacy%7D](https://api.github.com/users/sondt99/events%7B/privacy%7D)
