CVE-2026-59920
Java 취약성 분석 및 완화

개요

CVE-2026-59920 is a CRLF/newline injection vulnerability in Netty's STOMP codec that allows low-privileged network attackers to inject arbitrary headers into STOMP CONNECT frames, potentially enabling authentication bypass and privilege escalation. It affects the Maven artifact io.netty:netty-codec-stomp in versions >= 4.2.0.Final up to (excluding) 4.2.16.Final, and all versions up to (excluding) 4.1.136.Final. The vulnerability was published by Netty maintainer normanmaurer on July 14, 2026, and added to the GitHub Advisory Database on July 22, 2026. It carries a CVSS v3.1 base score of 6.5 (Medium) (GitHub Advisory, Netty Security Advisory).

기술적 세부 사항

The root cause is in io.netty.handler.codec.stomp.StompSubframeEncoder, classified as CWE-93 (Improper Neutralization of CRLF Sequences). The shouldEscape() method (lines 214–216) explicitly excludes CONNECT and CONNECTED commands from the escape routine to maintain STOMP 1.0 backward compatibility, but this also bypasses all newline validation. As a result, raw \n characters in header values are written directly to the wire buffer without sanitization, while other commands (e.g., SEND, SUBSCRIBE) correctly escape \n to \\n. The STOMP specification's intent was to skip the escape notation, not to permit raw newlines — Netty conflated escaping with validation. A public PoC (StompConnectHeaderInjectionPoC.java) has been published demonstrating the injection on Netty 4.2.12.Final (GitHub Advisory, Netty Security Advisory).

영향

Successful exploitation allows an attacker with low privileges to inject additional STOMP headers into CONNECT frames, with high integrity impact and no confidentiality or availability impact (CVSS I:H, C:N, A:N). Practical consequences include authentication bypass (e.g., injecting admin-role:true), privilege escalation via header overwrite (e.g., injecting a second login:admin header that some brokers honor as the last value), and potential connection hijacking by overwriting the host header. The actual impact is broker-dependent: custom brokers trusting all received headers are most at risk, while RabbitMQ and ActiveMQ have partial mitigations depending on their plugin configurations (GitHub Advisory).

착취 단계

  1. Identify target: Locate applications using io.netty:netty-codec-stomp (versions <= 4.2.15.Final or <= 4.1.135.Final) that act as STOMP proxies, WebSocket-STOMP bridges, or multi-tenant STOMP gateways where user-controlled input is placed into CONNECT frame header values.
  2. Craft malicious input: Prepare a header value containing a raw newline followed by the desired injected header, e.g., password\nadmin-role:true for the passcode field, or user\nlogin:admin for the login field.
  3. Submit input: Provide the crafted value through the application's input surface (e.g., a web form, API endpoint, or WebSocket message) that populates a CONNECT frame header.
  4. Observe encoder behavior: The vulnerable StompSubframeEncoder.encodeHeaders() writes the raw \n to the output buffer without escaping, splitting the value into two separate header lines on the wire.
  5. Broker processes injected header: The downstream STOMP broker (e.g., ActiveMQ, a custom broker) parses the injected line as a legitimate header. Depending on broker logic, this may grant elevated roles, overwrite the login header to escalate to an admin account, or redirect the connection via a spoofed host header.
  6. Verify exploitation: Confirm the injected header was accepted by observing broker behavior (e.g., elevated session permissions, successful authentication as a different user) (GitHub Advisory, Netty Security Advisory).

타협의 징후

  • Network: STOMP CONNECT frames on the wire containing unexpected additional headers (e.g., admin-role, duplicate login, or unexpected host values) beyond the standard set; STOMP traffic with raw newline characters embedded within header values.
  • Logs: Application logs showing STOMP CONNECT frames with more headers than expected; broker-side logs recording authentication events for users with elevated roles not explicitly granted; unexpected IllegalArgumentException after patching (indicating attempted injection post-fix).
  • Process/Application Behavior: STOMP sessions authenticated with unexpected privilege levels; connections routed to unexpected broker hosts; duplicate header keys (e.g., two login: entries) in STOMP frame logs.

완화 및 해결 방법

Upgrade to the patched versions: Netty 4.2.16.Final or Netty 4.1.136.Final, which add newline validation for CONNECT/CONNECTED frame headers, rejecting values containing raw \n or \r characters (Netty 4.2.16.Final Release, Netty 4.1.136.Final Release). As a workaround for applications that cannot immediately upgrade, implement application-level sanitization to strip or reject newline characters from any user-controlled input before it is placed into STOMP CONNECT frame header values. Multi-tenant STOMP gateways and WebSocket-STOMP bridges should be prioritized for patching given their higher exposure to untrusted user input (GitHub Advisory).

커뮤니티 반응

The advisory was published by Netty core maintainer normanmaurer on July 14, 2026, and the fix was included in the same release cycle as other security hardening changes (e.g., HTTP method/version control character rejection, MQTT UTF-8 validation). The advisory draws an explicit analogy to a prior Netty SMTP injection fix (GHSA-jq43-27x9-3v86), suggesting a pattern of protocol-level injection hardening across Netty codecs. No significant independent researcher commentary or broad media coverage has been identified at this time (GitHub Advisory).

추가 자료


근원이 보고서는 AI를 사용하여 생성되었습니다.

관련 Java 취약점:

CVE ID

심각도

점수

기술

구성 요소 이름

CISA KEV 익스플로잇

수정 사항이 있습니다.

게시된 날짜

CVE-2026-10050HIGH8.7
  • Java logoJava
  • kafka-4.0
아니요Jul 22, 2026
GHSA-v74w-7mr3-4qg3HIGH7.5
  • Java logoJava
  • io.netty:netty-codec-xml
아니요Jul 24, 2026
CVE-2026-59949MEDIUM6.5
  • Java logoJava
  • at.yawk.lz4:lz4-java
아니요Jul 24, 2026
GHSA-mfg7-5gfp-c4w3MEDIUM5.3
  • Java logoJava
  • io.netty:netty-codec-dns
아니요Jul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • github.com/aws/aws-cdk-go/awscdk/v2
아니요Jul 24, 2026

무료 취약성 평가

클라우드 보안 태세를 벤치마킹합니다

9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.

평가 요청

추가 Wiz 리소스

맞춤형 데모 받기

맞춤형 데모 신청하기

"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
데이비드 에슬릭최고정보책임자(CISO)
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
아담 플레처최고 보안 책임자(CSO)
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."
그렉 포니아토프스키위협 및 취약성 관리 책임자