Bug 2588734 (CVE-2026-142442)

Summary: CVE-2026-142442 io.netty/netty-codec-socks: Netty: Signed/unsigned conversion in SocksInitRequestDecoder leads to auth-scheme bypass
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ant, anujha, aschwart, asoldano, asyoung, aszczucz, bbaranow, bmaxwell, boliveir, bstansbe, ccranfor, cescoffi, chfoley, cmah, csuconic, dbruscin, dhanak, dlofthou, drichtar, drosa, dsimansk, ehelms, ewittman, fmariani, fmongiar, gmalinko, gsmet, gtanzill, gtully, istudens, ivassile, iweiss, janstey, jbaesner, jbuscemi, jkrystof, jmartisk, jnethert, jpasqual, jpechane, jsherman, jturenov, juwatts, jwon, kaycoth, kingland, kvanderr, lblicha, manderse, mcarlett, mhulan, mnovotny, mosmerov, mposolda, msvehla, nipatil, nwallace, ogajduse, olubyans, osousa, ozzy, pantinor, pberan, pesilva, pjindal, pmackay, prichard, rchan, rgemmell, rgodfrey, rguimara, rkubis, rmartinc, rstancel, rstepani, sausingh, sbiarozk, sdawley, smallamp, ssilvert, sthirugn, sthorger, swoodman, tbish, tcunning, thjenkin, tlavocat, tmielke, tzimanyi, varjain, vdosoudi, vmuzikar, yfang, zhunting
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in netty-codec-socks. A remote attacker can exploit this issue by sending a Socket Secure 5 (SOCKS5) handshake request specifying 128 or more authentication methods, causing the server to misinterpret the method count as a negative value due to signed byte parsing. This allows the attacker to bypass authentication scheme negotiation and desynchronize the network protocol stream.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-12-02 16:49:54 UTC
SocksInitRequestDecoder, the legacy SOCKS5 handshake decoder in the io.netty.handler.codec.socks package of netty-codec-socks, reads the NMETHODS field of the client greeting with the signed ByteBuf.readByte(). The SOCKS5 protocol defines this field as an unsigned octet. Valid wire values 0x80-0xFF (128-255 offered authentication methods) are therefore read as negative numbers. The decoder's authSchemeNum > 0 check fails for them, so it emits a successful SocksInitRequest with an empty authentication-scheme list. It consumes none of the method bytes that follow.

A remote client can send a spec-legal greeting that advertises 128 or more authentication methods. The server then sees a request with no offered schemes, so authentication-scheme negotiation is bypassed or misjudged. The unconsumed method bytes remain in the buffer and are interpreted as the start of the next SOCKS message, which desynchronizes the protocol stream.

Only applications that explicitly add new SocksInitRequestDecoder() to a channel pipeline are affected. This is the legacy decoder in netty-codec-socks, in versions up to and including 4.1.138.Final, and in 4.2.0.Final through 4.2.18.Final. The issue is fixed in 4.1.139.Final and 4.2.19.Final.

Affected versions: <= 4.1.138.Final; >= 4.2.0.Final, <= 4.2.18.Final
Patched versions: 4.1.139.Final; 4.2.19.Final
CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N (5.3)
CWE: CWE-115
Upstream advisory: https://github.com/netty/netty/security/advisories/GHSA-c7hc-m259-xhcr
CVE requested by the Netty Project via PSIRTSUPT-32166.