netty-incubator-codec-ohttp CVE-2026-61798
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-privilege read access to log aggregation system
-
DeliverySearch logs for BoringSSLAsymmetricCipherKeyPair or IllegalArgumentException entries
-
ExploitExtract raw private key byte array from toString() or exception message
-
ExecutionReconstruct HPKE private key from byte values
-
ImpactDecrypt intercepted OHTTP ciphertext or forge OHTTP session material
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK
2 techniques across 2 tactics: Collection, Discovery The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Two conditions must be met simultaneously: first, the application must log key-pair objects (by passing them directly or as part of a container object to a logging framework) OR catch and log the |
| Impact | The reported CVSS 8.1 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N) reflects the high downstream impact of full HPKE private key compromise - enabling decryption of OHTTP ciphertext and potential forgery - but the AV:N rating warrants scrutiny: network reachability applies only when log aggregation systems (SIEM, ELK, Splunk) are involved, and is not an intrinsic property of the |
| Exploit ScenarioDerived | An attacker with read access to a log aggregation system (such as a SIEM or ELK stack) receiving logs from an OHTTP relay application searches for log entries containing |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Private HPKE key material leaks from netty-incubator-codec-ohttp-hpke-classes-boringssl through two deterministic code paths: the toString() methods of BoringSSLAsymmetricCipherKeyPair and BoringSSLAsymmetricKeyParameter unconditionally render raw private key bytes, and BoringSSL.EVP_HPKE_KEY_init_or_throw() embeds Arrays.toString(privateKeyBytes) in a thrown IllegalArgumentException. Applications that log key-pair objects or persist exception messages - behavior that is standard with Java logging frameworks such as Logback and Log4j - will write complete HPKE private key material to log storage. No public exploit has been identified at time of analysis beyond the functional proof-of-concept included in the GitHub advisory GHSA-2mc4-j865-9q4r; a vendor-released patch is available as version 0.0.23.Final.
RemediationAI
Upgrade io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl to version 0.0.23.Final or later, confirmed by the upstream release at https://github.com/netty/netty-incubator-codec-ohttp/releases/tag/netty-incubator-codec-parent-ohttp-0.0.23.Final and documented in GitHub Security Advisory GHSA-2mc4-j865-9q4r (https://github.com/netty/netty-incubator-codec-ohttp/security/advisories/GHSA-2mc4-j865-9q4r). If immediate upgrade is not feasible, configure application logging to suppress output for the io.netty.incubator.codec.hpke.boringssl package at DEBUG level and below, which prevents key-pair objects from being serialized; note this does not address the IllegalArgumentException path, which surfaces at ERROR level and requires separate log-scrubbing rules to redact byte-array patterns of the form [n, n, n, ...] in messages from this package. As a mandatory post-remediation step, rotate all HPKE private keys that may have been in use while this library version was deployed, and audit existing log archives - including log aggregation systems and off-site backup copies - for retained key material matching the bytes=[...] pattern in BoringSSLAsymmetricKeyParameter entries.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in maven
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected artifact is io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl, Netty's incubator implementation of Hybrid Public Key Encryption (HPKE) backed by BoringSSL, used within the Oblivious HTTP (OHTTP) protocol stack. The root cause is CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) arising from Java's convention of calling toString() on logged objects and persisting exception messages. Specifically: BoringSSLAsymmetricKeyParameter.toString() (lines 70-76) calls Arrays.toString(bytes) without checking the isPrivate flag; BoringSSLAsymmetricCipherKeyPair.toString() (lines 72-78) composes this by appending "privateKey=" + privateKey; and BoringSSL.EVP_HPKE_KEY_init_or_throw() (lines 228-232) constructs an IllegalArgumentException whose message includes the full caller-supplied private key byte array. Java logging frameworks (SLF4J, Log4j 2, Logback) invoke toString() on any object passed as a log argument and routinely persist exception messages at WARN or ERROR level, making all three paths active leakage vectors in typical production deployments.
Know when Java gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Log aggregation systems are typically network-accessible (AV:N); reading logs requires low-privilege credentials (PR:L); key recovery enables full OHTTP confidentiality and integrity compromise (C:H/I:H); no availability impact.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
DescriptionGitHub Advisory
Summary
io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl exposes raw HPKE private key bytes in string representations and error messages. BoringSSLAsymmetricCipherKeyPair.toString() includes the private-key parameter object, and BoringSSLAsymmetricKeyParameter.toString() renders the full byte array with Arrays.toString(bytes). Separately, failed native key initialization includes Arrays.toString(privateKeyBytes) in the thrown IllegalArgumentException message. Applications that log key-pair objects or exceptions can persist private key material in logs.
Details
codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSLAsymmetricCipherKeyPair.java renders private key material through toString():
BoringSSLAsymmetricCipherKeyPair.toString()at lines 72-78 concatenates"privateKey=" + privateKey.privateKeyis aBoringSSLAsymmetricKeyParametercreated withisPrivate=trueat lines 26-36.
codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSLAsymmetricKeyParameter.java then renders all bytes:
BoringSSLAsymmetricKeyParameter.toString()at lines 70-76 returns"bytes=" + Arrays.toString(bytes)regardless of whetherisPrivateis true.
A separate error path in codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSL.java also exposes caller-provided private key bytes:
EVP_HPKE_KEY_init_or_throw(...)at lines 228-232 throwsIllegalArgumentException("privateKeyBytes does not contain a valid private key: " + Arrays.toString(privateKeyBytes))when BoringSSL rejects the key.
Because Java logging frameworks commonly call toString() for structured objects and commonly persist exception messages, these paths can place complete HPKE private key material in logs or telemetry.
Proof of concept
Safe local verification was performed without native BoringSSL by compiling the relevant Java classes and a no-op native stub for the unused finalizer reference. The observed output includes the full private key byte array:
BoringSSLAsymmetricCipherKeyPair{privateKey=BoringSSLAsymmetricKeyParameter{bytes=[1, 2, 3, 4], isPrivate=true}, publicKey=BoringSSLAsymmetricKeyParameter{bytes=[5, 6, 7, 8], isPrivate=false}}Minimal reproducer concept in the same package:
package io.netty.incubator.codec.hpke.boringssl;
public final class VerifyPrivateKeyToString {
public static void main(String[] args) {
byte[] privateKey = new byte[] {1, 2, 3, 4};
byte[] publicKey = new byte[] {5, 6, 7, 8};
BoringSSLAsymmetricCipherKeyPair pair = new BoringSSLAsymmetricCipherKeyPair(privateKey, publicKey);
System.out.println(pair.toString());
}
}The code path is deterministic: the production toString() methods concatenate the raw private-key byte array.
Impact
If an affected key pair or initialization exception is logged, application logs contain complete HPKE private key material. Anyone with access to those logs can recover the key. Depending on key reuse and log retention, this can compromise:
- confidentiality of OHTTP messages encrypted to the exposed key;
- integrity/authenticity expectations for future messages if the key remains active;
- incident response and key rotation assumptions, because logs may retain key material long after the in-memory key is rotated.
Suggested remediation
- Redact private key material in
BoringSSLAsymmetricKeyParameter.toString()whenisPrivateis true, for examplebytes=<redacted>or only key type/length. - Redact
privateKeyinBoringSSLAsymmetricCipherKeyPair.toString(). - Remove
Arrays.toString(privateKeyBytes)fromBoringSSL.EVP_HPKE_KEY_init_or_throw(...); report only length and KEM metadata. - Add regression tests asserting that
toString()and exception messages do not contain private key byte values. - Consider making key pair classes avoid implementing detailed
toString()for sensitive material entirely.
References
codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSLAsymmetricCipherKeyPair.java:72-78codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSLAsymmetricKeyParameter.java:70-76codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSL.java:228-232
Articles & Coverage 2
Executive ViewAI
The netty-incubator-codec-ohttp-hpke-classes-boringssl library leaks encryption keys to standard application logs, exposing the credentials that protect sensitive communications. Publicly available exploit code exists, creating immediate risk of data breach for any organization using this library where logs are accessible to attackers or insiders.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)GitHub Advisory
Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m
Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti
Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent
Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug
JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up
Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up
The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow
Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla
The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during
GHSA-2mc4-j865-9q4r
NVD
CVE.org
Exploit-DB