Unauthenticated CPU Exhaustion DoS in netty-incubator-codec-bhttp
An infinite loop vulnerability in the BinaryHttpParser of netty-incubator-codec-bhttp allows unauthenticated attackers to exhaust event-loop threads and induce a persistent denial of service via specially crafted BHTTP requests.
The netty-incubator-codec-bhttp library, used for decoding Binary HTTP (RFC 9292) messages, contains a critical control-flow defect in the BinaryHttpParser.readFieldSection method. The vulnerability arises from an improper loop termination condition (fieldSectionLength != 0) and the failure to enforce forward progress when processing field lines.
An unauthenticated attacker can supply a malformed BHTTP request where the declared field-section length does not match the actual data. If the parser consumes zero bytes or consumes more bytes than declared, the loop enters an infinite busy-spin. Because the code relies on Java assert statements - which are stripped in production JVM environments - to guarantee termination and progress, the defect is fully exposed to remote exploitation. A small number of these requests can pin every available Netty event-loop thread at 100% CPU, resulting in a complete denial of service for OHTTP gateways or clients until the process is restarted.
Attack Chain
- Attacker obtains the target OHTTP gateway's public HPKE key configuration.
- Attacker crafts a malicious BHTTP message where the declared field-section length is understated relative to the actual field line contents.
- Attacker wraps the malicious BHTTP payload within a standard OHTTP request, encrypted with the gateway's public key.
- OHTTP gateway receives the request and decrypts the chunk into the
binaryHttpCumulationbuffer. OHttpRequestResponseContextpasses the attacker-controlled plaintext directly toBinaryHttpParser.parse.BinaryHttpParserenters thereadFieldSectionmethod and triggers the vulnerablewhileloop (lines 619-626).- The loop fails to terminate due to the
!= 0condition or zero-byte progress, initiating an infinite CPU-bound spin. - Repeating the request exhausts the Netty event-loop group, leading to a total denial of service.
Impact
The attack results in an unauthenticated, persistent denial of service. By pinning the event-loop threads of an OHTTP gateway or client, the attacker renders the service incapable of accepting new connections or processing traffic. The impact is significant for high-availability infrastructure relying on Netty-based OHTTP gateways, as the service remains unavailable until manual intervention (process restart) occurs.
Recommendation
- Update
netty-incubator-codec-bhttpto a version containing the patchedBinaryHttpParserlogic that replaces the vulnerablewhileloop with explicit exception handling. - Promote input validation invariants previously handled by
assert(lines 622, 624) to explicitCorruptedFrameExceptionchecks to ensure security regardless of JVM assertion settings. - Verify that production deployments are not bypassing framing errors; ensure the parser enforces strict adherence to RFC 9292 regarding declared versus actual field-section length consumption.
Immediate actions
Patch all instances of netty-incubator-codec-bhttp to the corrected version identified in the vendor advisory.
Mitigations
Monitor for sustained 100% CPU utilization on Netty event-loop threads as an indicator of attempted or successful exploitation.
CVE-2026-63202