netty-incubator-codec-bhttp CVE-2026-61799
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted BHTTP known-length request frame
-
DeliveryEmbed 8-byte varint encoding 2^31 as method length
-
ExploitParser accumulates long length into int sumBytes, wrapping negative
-
ExecutionNegative sumBytes bypasses readable-bytes completeness guard
-
PersistParser computes negative buffer index from readerIndex + sumBytes
-
ImpactArrayIndexOutOfBoundsException crashes Netty channel
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to use |
| Impact | The official CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, score 5.3) accurately characterises the threat: network-reachable, zero-complexity, unauthenticated, with impact limited to availability. The trivial exploit complexity is confirmed by the published 15-byte proof-of-concept, which materially lowers the practical barrier for exploitation below what the moderate base score suggests. No EPSS data was supplied, and the vulnerability is absent from CISA KEV, so widespread active exploitation is not confirmed. Critically, the Java managed runtime prevents memory corruption - the advisory explicitly states no memory corruption or information disclosure was observed, making the 'Information Disclosure' and 'Buffer Overflow' metadata tags misleading artifacts that should be disregarded. Real-world risk is bounded by deployment footprint: Binary HTTP (RFC 9292) is an experimental incubator protocol with limited production adoption compared to standard HTTP stacks, meaning most Netty deployments are unaffected. For the subset of applications that do expose |
| Exploit ScenarioDerived | A remote unauthenticated attacker sends a 15-byte Binary HTTP payload to a server running |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Binary HTTP parser in Netty's netty-incubator-codec-bhttp (all versions through 0.0.22.Final) crashes with an unchecked ArrayIndexOutOfBoundsException when processing a 15-byte crafted payload, enabling remote unauthenticated denial of service. The parser accumulates attacker-controlled varint field lengths - read correctly as long - into int offset counters; a value of 2^31 silently wraps the accumulator negative via Java's compound-assignment narrowing, bypassing the readable-bytes guard and reaching unchecked buffer index arithmetic. Publicly available exploit code exists per the GitHub advisory GHSA-pgrf-4654-3gq8; no active exploitation is confirmed in CISA KEV.
RemediationAI
Upgrade io.netty.incubator:netty-incubator-codec-bhttp to version 0.0.23.Final, the vendor-confirmed patched release documented at https://github.com/netty/netty-incubator-codec-ohttp/releases/tag/netty-incubator-codec-parent-ohttp-0.0.23.Final and covered by advisory https://github.com/netty/netty-incubator-codec-ohttp/security/advisories/GHSA-pgrf-4654-3gq8. If an immediate upgrade is not feasible, restrict network access to BHTTP endpoints at the firewall or gateway layer so that only trusted peers can reach BinaryHttpParser; this eliminates the attack surface but disables external BHTTP connectivity entirely. Placing an upstream proxy that enforces a strict maximum payload size reduces (but does not eliminate) risk, since the exploit requires only 15 bytes with a crafted varint, which many generic size limits would pass. Do not rely on application-level exception handlers as a compensating control - the unchecked exception closes the Netty channel directly before application code can intervene.
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 component is io.netty.incubator:netty-incubator-codec-bhttp, a Netty incubator library that implements RFC 9292 (Binary Representation of HTTP Messages) using RFC 9000 variable-length integer encoding. In BinaryHttpParser.java, three distinct parser paths - readRequestHead (lines 386-402), readFieldLine (lines 659-680), and getIndeterminateLength (lines 544-553) - declare cumulative offset accumulators as int sumBytes but add attacker-supplied varint field lengths that were correctly decoded as long. Java's compound assignment (int += long) silently narrows the 64-bit result back to 32 bits (CWE-190: Integer Overflow or Wraparound), so a protocol-legal varint encoding of 2^31 wraps sumBytes to a large negative value. This negative offset then bypasses the completeness check if (sumBytes >= in.readableBytes()) - which expects a non-negative comparison - and is subsequently used in unchecked index arithmetic (in.readerIndex() + sumBytes, nameIdx + (int) nameLength), producing a negative index that the JVM rejects with an unhandled exception rather than returning a controlled decoder error.
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:N/UI:N/S:U/C:N/I:N/A:L
Network-reachable parser requires no auth; Java bounds checking prevents memory corruption, so only availability is impacted via channel crash.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
DescriptionGitHub Advisory
Summary
io.netty.incubator:netty-incubator-codec-bhttp uses attacker-controlled Binary HTTP variable-length integers as long values but accumulates them into int offsets. Large valid varint lengths wrap the internal offset negative, leading to unchecked ArrayIndexOutOfBoundsException / IndexOutOfBoundsException from a tiny malformed BHTTP payload. A remote peer can trigger connection-level denial of service in applications that expose BinaryHttpParser / BinaryHttpDecoder to untrusted input.
Details
In codec-bhttp/src/main/java/io/netty/incubator/codec/bhttp/BinaryHttpParser.java, several parser paths store cumulative byte offsets in int sumBytes and then add attacker-controlled long lengths using compound assignment. In Java, int += long narrows the result back to int, so a length such as 2^31 wraps sumBytes negative.
Primary request-control-data path:
readRequestHead(...)declaresint sumBytes = 0atBinaryHttpParser.java:386.- It reads
methodLengthas alongatBinaryHttpParser.java:394. - It performs
sumBytes += methodLengthatBinaryHttpParser.java:395, narrowing the result toint. - If
methodLengthis2^31,sumByteswraps negative and bypassesif (sumBytes >= in.readableBytes()) return nullatBinaryHttpParser.java:396-398. - The parser then computes
schemeLengthIdx = in.readerIndex() + sumBytesand callsin.getByte(schemeLengthIdx)atBinaryHttpParser.java:401-402, producing a negative index exception.
The same pattern is present in header parsing:
readFieldLine(...)usesint sumBytesand addslong nameLength/long valueLengthatBinaryHttpParser.java:659-680.valueLengthIdx = nameIdx + (int) nameLengthatBinaryHttpParser.java:674can also overflow.
getIndeterminateLength(...) similarly uses int sumBytes and long possibleTerminator at BinaryHttpParser.java:544-553.
Proof of concept
Safe local verification performed in this repository. After compiling codec-bhttp, the following minimal verifier uses a 15-byte payload:
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.incubator.codec.bhttp.BinaryHttpParser;
public final class VerifyBhttpOverflow {
public static void main(String[] args) {
byte[] payload = new byte[] {
0x00, (byte)0xc0, 0x00, 0x00, 0x00, (byte)0x80, 0x00, 0x00, 0x00,
0x47, 0x45, 0x54, 0x58, 0x58, 0x58
};
ByteBuf input = Unpooled.wrappedBuffer(payload);
try {
new BinaryHttpParser(8192).parse(input, false);
System.out.println("returned");
} catch (Throwable t) {
System.out.println(t.getClass().getName());
System.out.println(t.getMessage());
}
}
}Payload interpretation:
00: known-length request frame indicator.c000000080000000: valid 8-byte varint encoding of0x80000000(2^31) as the method length.474554585858: a few dummy bytes so the parser proceeds far enough to compute the next index.
Observed result:
java.lang.ArrayIndexOutOfBoundsException
Index -2147483639 out of bounds for length 15The parser should reject the malformed/incomplete message with a controlled decoder exception or return null awaiting more bytes; it should not allow integer wraparound to reach unchecked buffer indexing.
Impact
A remote peer can trigger an unchecked exception in the Binary HTTP decoder using a tiny payload. In typical Netty pipelines this closes or fails the affected channel. Depending on application-level exception handling, repeated payloads can cause sustained denial of service for exposed BHTTP endpoints. No memory corruption or information disclosure was observed because the failure occurs in Java/Netty bounds checks.
Suggested remediation
- Use
longfor all cumulative byte counts derived from protocol lengths. - Before converting any protocol length to
int, verify it is non-negative, no larger thanInteger.MAX_VALUE, and no larger than available readable bytes and configured limits. - Replace
sumBytes >= in.readableBytes()checks with precise checked arithmetic that permits exact-boundary complete fields but rejects impossible lengths. - Throw a controlled
CorruptedFrameException/TooLongFrameExceptionfor invalid or unsupported lengths. - Add regression tests for 8-byte varint lengths at and above
Integer.MAX_VALUEin request control data, response control data, known and indeterminate field sections, and field lines.
References
codec-bhttp/src/main/java/io/netty/incubator/codec/bhttp/BinaryHttpParser.java:386-402codec-bhttp/src/main/java/io/netty/incubator/codec/bhttp/BinaryHttpParser.java:659-680codec-bhttp/src/main/java/io/netty/incubator/codec/bhttp/BinaryHttpParser.java:544-553- RFC 9292: Binary Representation of HTTP Messages
- RFC 9000 variable-length integer encoding
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
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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-pgrf-4654-3gq8
NVD
CVE.org
Exploit-DB