netty-incubator-codec-ohttp, Unbounded Variable-Length Fields, CVE-2026-61827 (High) -DC-Aug2026-1721

Listen to this Post

CVE-2026-61827 addresses a critical resource exhaustion vulnerability in the Netty incubator implementation of the Binary HTTP (BHTTP) parser, specifically within the `netty-incubator-codec-ohttp` library. The core issue lies in the `BinaryHttpParser` class, which is responsible for decoding Binary HTTP messages as defined in RFC 9292. These messages are used extensively in Oblivious HTTP (OHTTP) gateways and clients, where decrypted OHTTP request bodies are passed directly to the parser for field extraction.
The BHTTP wire format prefixes each field (such as headers and metadata) with a variable-length integer (varint) that indicates the length of the subsequent data. The parser reads these varints to determine how many bytes to consume for each field. However, the implementation does not enforce any upper bounds on these encoded length values. Because the varint values are fully controlled by the remote peer (the attacker), they can specify arbitrarily large lengths, such as `0xFFFFFFFFFFFFFFFF` or other massive numbers.
When the parser encounters an oversized varint, it attempts to allocate or accumulate a buffer of that claimed size. Since no limit checks are performed, the parser will continuously read and buffer data from the network stream in an attempt to satisfy the declared length. With a malicious peer sending a stream that never terminates or sends data very slowly, the parser can be kept in a loop, indefinitely consuming memory. Over time, this unbounded buffering leads to an `OutOfMemoryError` (OOM), crashing the application or making it unresponsive.
Furthermore, the parser accumulates these attacker-controlled varint lengths into `int` offsets after reading them as `long` values. A large valid varint can wrap the internal offset to a negative value, triggering an unchecked `ArrayIndexOutOfBoundsException` or `IndexOutOfBoundsException` from a tiny malformed BHTTP payload. This dual nature—both memory exhaustion and parser crashes—makes the vulnerability particularly dangerous.
The flaw exists because the parsing logic trusts the remote peer’s length declarations without any validation against configurable maximums. In a typical deployment, an OHTTP gateway receives untrusted requests from clients, decrypts them, and then feeds the inner Binary HTTP payload directly into BinaryHttpParser.parse(...). An unauthenticated attacker can therefore craft a request containing an exaggerated varint length, encapsulated within a normal OHTTP envelope, and send it to the gateway.
Once processed, the gateway’s event-loop thread becomes stuck trying to fulfill the massive allocation, consuming CPU and memory until the JVM exhausts its heap. A single request can pin a thread at 100% CPU; multiple such requests can exhaust the entire event-loop group, effectively taking the gateway offline. The vulnerability is rated High severity due to the ease of exploitation and the significant impact on availability.
The maintainers addressed this by introducing configurable limits for variable-length fields in version 0.0.23.Final. The fix adds checks that reject varint values exceeding predefined thresholds, preventing the parser from entering an infinite buffering state. All users are strongly advised to upgrade immediately.

DailyCVE Form:

Platform: ……. Netty
Version: …….. <= 0.0.22.Final
Vulnerability :…… Unbounded Buffering OOM
Severity: ……. High
date: ………. 2026-07-18

Prediction: …… 2026-08-20

What Undercode Say:

Check current version in Maven project
mvn dependency:tree | grep netty-incubator-codec-ohttp
Verify if vulnerable (version <= 0.0.22.Final)
curl -s https://raw.githubusercontent.com/netty/netty-incubator-codec-ohttp/main/pom.xml | grep version
Upgrade to patched version in pom.xml
<dependency>
<groupId>io.netty.incubator</groupId>
<artifactId>netty-incubator-codec-ohttp</artifactId>
<version>0.0.23.Final</version>
</dependency>
Scan for known vulnerabilities using OWASP Dependency Check
dependency-check --scan . --format HTML --out report.html
Monitor heap usage for abnormal growth (example with jstat)
jstat -gc $(pgrep -f netty) 1s
Check for OOM errors in logs
grep -i "OutOfMemoryError" /var/log/application.log

Exploit: (Educational Purposes!)

A remote attacker can send a crafted Binary HTTP message where the field-length varint is set to an extremely large value (e.g., 0xFFFFFFFFFF). The parser will interpret this as a request to allocate a buffer of that size, leading to continuous memory consumption. A simple proof-of-concept involves constructing a BHTTP frame with a malicious varint prefix:

[varint length = 0xFFFFFFFFFFFFFFFF] [arbitrary payload]

When sent to an OHTTP gateway, the `BinaryHttpParser` will attempt to read and buffer the claimed number of bytes, eventually exhausting available heap memory. Multiple such requests can be parallelized to accelerate the denial-of-service condition.

Protection:

  • Immediate Upgrade: Update to `netty-incubator-codec-ohttp` version `0.0.23.Final` or later, which enforces strict limits on variable-length fields.
  • Configuration: If upgrade is not immediately possible, implement a reverse proxy or firewall rule to limit the size of incoming HTTP request bodies before they reach the Netty parser.
  • Monitoring: Set up heap usage alerts and enable GC logging to detect abnormal memory consumption patterns early.
  • Input Validation: Consider adding a custom wrapper around `BinaryHttpParser` that validates varint lengths against a configurable maximum before parsing.
  • Disable Assertions: Note that assertions are disabled in production; do not rely on them for protection.

Impact:

Successful exploitation leads to Denial of Service (DoS) through memory exhaustion, causing the application to crash or become unresponsive. In OHTTP gateway deployments, this can render the entire gateway offline, affecting all clients that rely on it for privacy-preserving HTTP communication. The attack requires no authentication and can be launched with a single crafted request, making it highly attractive for attackers. There is no data confidentiality or integrity impact, but availability is completely compromised.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top