CVE-2026-142442: Io.netty/netty-codec-socks: netty: signed/unsigned conversion in socksinitrequestdecoder leads to auth-scheme bypass

Published Dec 2, 2026
·
Updated

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.

Other sources

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.

— Red Hat

Affected Software

1 affected component
maven/io.netty/netty-codec-socks<=4.1.138.Final, >=4.2.0.Final<=4.2.18.Final

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade io.netty/netty-codec-socks to a version that resolves this vulnerability.

    Fixed in 4.1.139.Final
  2. Upgrade

    Upgrade io.netty/netty-codec-socks to a version that resolves this vulnerability.

    Fixed in 4.2.19.Final

Event History

Dec 2, 2026
Data Sourced
via Red Hat·04:49 PM
DescriptionSeverityAffected Software
CVE Published
via MITRE·06:27 PM
Data Sourced
via MITRE·06:27 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Applications that use the legacy SOCKS5 handshake decoder, SocksInitRequestDecoder, in the io.netty.handler.codec.socks package of netty-codec-socks are implicated. The provided data does not identify other Netty SOCKS components as affected.

2

Does an attacker need credentials or user interaction?

No. The reported vector is network-accessible with no privileges or user interaction required; the attacker sends a crafted SOCKS5 greeting to the server.

3

Must the attacker send malformed SOCKS5 traffic?

No. The trigger can be a specification-valid SOCKS5 greeting advertising 128 or more authentication methods. Values from 128 through 255 are valid unsigned NMETHODS values but are interpreted as negative by the affected decoder.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203