Skip to main content

netty-incubator-codec-bhttp CVE-2026-61799

MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-08-20 https://github.com/netty/netty-incubator-codec-ohttp GHSA-pgrf-4654-3gq8
5.3
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted BHTTP known-length request frame
  2. Delivery
    Embed 8-byte varint encoding 2^31 as method length
  3. Exploit
    Parser accumulates long length into int sumBytes, wrapping negative
  4. Execution
    Negative sumBytes bypasses readable-bytes completeness guard
  5. Persist
    Parser computes negative buffer index from readerIndex + sumBytes
  6. Impact
    ArrayIndexOutOfBoundsException 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 BinaryHttpParser or BinaryHttpDecoder from io.netty.incubator:netty-incubator-codec-bhttp and expose these components to network connections from untrusted peers. The parser must be processing a known-length request frame (frame indicator byte 0x00) - the same integer-overflow pattern also exists in header field-line and indeterminate-length parsing paths. Per the CVSS vector (PR:N), no authentication is required. No special server configuration beyond deploying the vulnerable library in a BHTTP-processing Netty pipeline is needed. Exploitation is completely impossible against applications that do not use Binary HTTP (RFC 9292); standard HTTP/1.1 and HTTP/2 Netty pipelines share none of the affected code paths. The primary limiting factor for real-world exposure is that Binary HTTP is an incubator/experimental protocol with limited production adoption.

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 BinaryHttpParser or BinaryHttpDecoder to untrusted peers, the combination of a public POC, zero-privilege network exploitation, and channel-level crash justifies treating this as a high-priority patch.

Exploit ScenarioDerived

A remote unauthenticated attacker sends a 15-byte Binary HTTP payload to a server running netty-incubator-codec-bhttp ≤ 0.0.22.Final, where the known-length request frame indicator (0x00) is followed by an 8-byte varint encoding 2^31 as the method length. The parser accumulates this into int sumBytes, which wraps to -2147483648, bypassing the readable-bytes guard; the subsequent index computation produces a negative array offset, throwing an unhandled ArrayIndexOutOfBoundsException that terminates the Netty channel. A working proof-of-concept for this exact payload is published in GitHub advisory GHSA-pgrf-4654-3gq8.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

maven io.netty.incubator:netty-incubator-codec-bhttp fix: 0.0.23.Final

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

GitHub Advisory PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 5.3 MEDIUM

Network-reachable parser requires no auth; Java bounds checking prevents memory corruption, so only availability is impacted via channel crash.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

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(...) declares int sumBytes = 0 at BinaryHttpParser.java:386.
  • It reads methodLength as a long at BinaryHttpParser.java:394.
  • It performs sumBytes += methodLength at BinaryHttpParser.java:395, narrowing the result to int.
  • If methodLength is 2^31, sumBytes wraps negative and bypasses if (sumBytes >= in.readableBytes()) return null at BinaryHttpParser.java:396-398.
  • The parser then computes schemeLengthIdx = in.readerIndex() + sumBytes and calls in.getByte(schemeLengthIdx) at BinaryHttpParser.java:401-402, producing a negative index exception.

The same pattern is present in header parsing:

  • readFieldLine(...) uses int sumBytes and adds long nameLength / long valueLength at BinaryHttpParser.java:659-680.
  • valueLengthIdx = nameIdx + (int) nameLength at BinaryHttpParser.java:674 can 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:

java
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 of 0x80000000 (2^31) as the method length.
  • 474554585858: a few dummy bytes so the parser proceeds far enough to compute the next index.

Observed result:

text
java.lang.ArrayIndexOutOfBoundsException
Index -2147483639 out of bounds for length 15

The 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 long for all cumulative byte counts derived from protocol lengths.
  • Before converting any protocol length to int, verify it is non-negative, no larger than Integer.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 / TooLongFrameException for invalid or unsupported lengths.
  • Add regression tests for 8-byte varint lengths at and above Integer.MAX_VALUE in 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-402
  • codec-bhttp/src/main/java/io/netty/incubator/codec/bhttp/BinaryHttpParser.java:659-680
  • codec-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

Prevalence
Low
Netty incubator library; Binary HTTP is experimental, limited production use
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low
NVD CVE.org GHSA GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

pkg:maven/io.netty.incubator:netty-incubator-codec-bhttp

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

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

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy