Back to the CVE list
CVE-2026-61799

netty-incubator-codec-ohttp: Binary HTTP parser unchecked varint length overflow causes decoder crash

CVSS score

5.3

EPSS probability

—

Risk score

0.5

Published

1 mo ago

Official patch verified

Etkilenen ürün ve sürüm için yayımlanan güvenlik güncellemesini uygulayın.

Impact on My Inventory

Only the personal products you have added to your account are assessed; an organisation's inventory does not appear here.

Checking session…

Vulnerability description

DayBreach CVE AI Research

CVE-2026-61799 has vendor, distribution, patch and security-source records on file. We can compare them and prepare an explanation linked to the evidence.

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

IMPACT: Affected Products and Software

Affected Products

The following products are affected by CVE-2026-61799 vulnerability. Where our threat engine knows the exact affected versions, they are listed below.

IDVENDORPRODUCTACTION
1mavenio.netty.incubator:netty-incubator-codec-bhttp View
2mavenio.netty.incubator:netty-incubator-codec-bhttp View
Total affected vendors: 1|Products: 2

RED HAT CSAF/VEX: Product Impact Check

Red Hat has not yet published a CSAF/VEX impact record for this CVE. This does not mean “not affected”.

SCORING: CVSS from Multiple Sources

CVSS Scores

The Common Vulnerability Scoring System is a standardised framework for assessing the severity of vulnerabilities in software and systems. We collect and display CVSS scores from several sources for each CVE.

SCOREVERSIONSEVERITYVECTORSOURCE
5.3CVSS 3.x—Vector not publishedGitHub Advisory
0.0CVSS 4.0—Vector not publishedGitHub Advisory

Patch and Remediation Guide

Solution & Remediation Advisory

Patch verified

1 doğrulanmış yama veya düzeltilmiş sürüm kanıtı bulundu.

osvio.netty.incubator:netty-incubator-codec-bhttp0.0.23.Final

OSV düzeltilmiş sürüm: 0.0.23.Final

Confirm the affected product and version against the source evidence above.
Restrict access to internet-facing services and apply network segmentation.
Apply the official update named in the evidence only to the matching product and version.
Monitor server logs and network endpoints for signs of anomalous execution.

Public exploit and active exploitation status

Verified exploit intelligence

No verified public PoC, exploit repository or Metasploit module has been found for this CVE yet.

Weakness Classification and Attack Patterns (CWE & CAPEC)

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorises the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-61799 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-61799 weaknesses.

Attack Vector and Accessibility

ExposureAğ üzerinden
PermissionsGerekmiyor
UserGerekmiyor

Official Sources and Advisories

CVSS Vector Radar Chart

5.3 / 10
Attack VectorNetworkComplexityLowPrivilegesNoneUser Interact.NoneConfidentialityLowIntegrityNoneAvailabilityLow

Vulnerability Scoring Details

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone required
User InteractionNone required
Confidentiality (Gizlilik)Low
Integrity (Bütünlük)None
Availability (Erişilebilirlik)Low

Yama doğrulandı

1 doğrulanmış yama veya düzeltilmiş sürüm kanıtı bulundu.

Follow the vendor

M
maven logo
maven

Weakness Type (CWE & CAPEC)

Similar Vulnerabilities

Get this vulnerability through the API

Affected products, version ranges, exploitation status and patch information in a single request, with a free key.

curl -H "x-api-key: $DAYBREACH_API_KEY" \
  "https://api.daybreach.dev/api/v1/intel/cves/CVE-2026-61799"