CVE-2026-59921:
Java 취약성 분석 및 완화
개요
CVE-2026-59921 is a CRLF injection vulnerability in Netty's HttpPostRequestEncoder component that allows authenticated attackers to inject arbitrary MIME headers into multipart HTTP request bodies by supplying crafted filenames containing \r\n sequences. It affects io.netty:netty-codec-http versions up to and including 4.2.15.Final and 4.1.135.Final. The vulnerability was published by Netty maintainer normanmaurer on July 14, 2026, and added to the GitHub Advisory Database on July 22, 2026. The official GitHub Advisory assigns a CVSS v3.1 score of 5.7 (Moderate) with an adjacent-network attack vector, while the advisory description also references a researcher-calculated score of 8.1 (High) under a network attack vector (GitHub Advisory, Netty Security Advisory).
기술적 세부 사항
The root cause is CWE-93 (Improper Neutralization of CRLF Sequences): HttpPostRequestEncoder.java directly concatenates user-supplied filenames and field names into Content-Disposition MIME headers at lines 519, 633, 674, and 686–688 without any CRLF validation. The setFilename() methods in DiskFileUpload, MemoryFileUpload, and MixedFileUpload only check for null, performing no sanitization. Because MIME headers are delimited by \r\n, an attacker who controls the filename parameter can terminate the current header value and inject new headers (e.g., Content-Type: text/html) or even new multipart body parts. Exploitation requires low privileges — specifically, the ability to supply a filename that is passed to HttpPostRequestEncoder without prior sanitization by the application. A public proof-of-concept (MultipartFilenameInjectionPoC.java) has been published and verified against Netty 4.2.12.Final (GitHub Advisory, Netty Security Advisory).
영향
Successful exploitation enables MIME header injection into multipart request bodies, with three primary consequences: (1) Content-Type spoofing — overriding application/octet-stream with text/html to cause uploaded files to be served as HTML, enabling stored XSS; (2) arbitrary MIME header injection — inserting custom headers (e.g., X-Bypass-Check: true) that may be processed by downstream middleware, CDNs, or storage layers; and (3) multipart boundary confusion — injecting new boundary delimiters to create or override form fields processed by the server. Confidentiality impact is assessed as None by the official advisory (no direct data leakage), while integrity impact is High due to content manipulation and potential XSS. Availability is unaffected (GitHub Advisory).
착취 단계
- Identify a vulnerable target: Locate an application that uses Netty's
HttpPostRequestEncoderto construct multipart HTTP requests and passes user-controlled filenames toDiskFileUpload,MemoryFileUpload, orMixedFileUploadwithout prior CRLF sanitization (e.g., file upload proxies, API gateways, microservices). - Craft a malicious filename: Construct a filename containing embedded CRLF sequences to inject additional MIME headers. Example payload:
innocent.txt"\r\nContent-Type: text/html\r\nX-Injected: true\r\n\r\n<script>alert(document.cookie)</script>\r\n-- - Submit the file upload request: Send a multipart POST request to the target endpoint with the crafted filename. The Netty encoder will embed the filename directly into the
Content-Dispositionheader without validation. - Observe injected headers in the wire format: The encoded multipart body will contain the injected
Content-Type: text/htmlandX-Injected: trueheaders as separate MIME headers within the body part, overriding the original content type. - Achieve the attack objective: If the receiving server or downstream system serves the uploaded file back to users, the
Content-Type: text/htmloverride causes the file to be rendered as HTML, executing the injected XSS payload. Alternatively, injected custom headers may bypass middleware access controls or manipulate downstream processing logic (GitHub Advisory, Netty Security Advisory).
타협의 징후
- Network: Multipart POST requests where the
Content-Dispositionheader'sfilenameparameter contains literal\r\nsequences, percent-encoded CRLF (%0D%0A), or embedded header-like strings (e.g.,Content-Type:,X-prefixes) within the filename value. - Logs: Application or proxy logs showing filenames with unusual characters such as carriage returns, newlines, or embedded header names; HTTP access logs recording POST requests to file upload endpoints with abnormally long or malformed
Content-Dispositionvalues. - File System: Uploaded files stored with filenames containing CRLF characters or truncated at a quote character, indicating the server received an injected filename.
- Application Behavior: Unexpected
Content-Typevalues (e.g.,text/html) associated with files that should be binary types (e.g., images, PDFs); downstream middleware or CDN logs showing unexpected custom headers (e.g.,X-Bypass-Check,X-Custom-Auth) originating from multipart body parts (GitHub Advisory).
완화 및 해결 방법
Upgrade to the patched versions: Netty 4.2.16.Final or Netty 4.1.136.Final, which include fixes for this vulnerability (Netty 4.2.16.Final Release, Netty 4.1.136.Final Release). If immediate upgrade is not possible, applications should sanitize filenames before passing them to HttpPostRequestEncoder by rejecting or stripping any \r or \n characters. As a defense-in-depth measure, API gateways or reverse proxies in front of Netty-based services should validate and sanitize Content-Disposition filename parameters in incoming requests before forwarding them.
커뮤니티 반응
The advisory was published by Netty core maintainer normanmaurer on July 14, 2026, and reviewed and published to the GitHub Advisory Database on July 22, 2026. Tenable added a cloud security plugin (ID 445169) for this vulnerability shortly after the advisory was published. No significant broader media coverage or notable independent researcher commentary has been identified beyond the official advisory and vendor release notes (GitHub Advisory).
추가 자료
근원: 이 보고서는 AI를 사용하여 생성되었습니다.
관련 Java 취약점:
무료 취약성 평가
클라우드 보안 태세를 벤치마킹합니다
9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.
추가 Wiz 리소스
맞춤형 데모 받기
맞춤형 데모 신청하기
"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."