netty-incubator-codec-ohttp CVE-2026-61798
HIGHSeverity 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
Lifecycle Timeline
3Blast Radius
ecosystem impact- 1 maven packages depend on io.netty.incubator:netty-incubator-codec-ohttp-hpke-classes-boringssl (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 0.0.23.Final.
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
AnalysisAI
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. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | 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 `IllegalArgumentException` thrown by `BoringSSL.EVP_HPKE_KEY_init_or_throw()` when key initialization fails; second, the attacker must have read access to those logs via a log file, log aggregation platform, or exception telemetry pipeline. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | 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 `toString()` defect itself. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | Full exploit scenario with step-by-step reproduction available after sign-in. |
| Remediation | 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). … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours, identify all applications using netty-incubator-codec-ohttp-hpke-classes-boringssl by auditing dependency files (pom.xml, build.gradle) and document current versions deployed. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
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
Same weakness CWE-200 – Information Exposure
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-2mc4-j865-9q4r