🇰🇷 한글 설명
Netty 4.1.59.Final 이전 버전의 Unix 계열 시스템에서 multipart 디코더 사용 시 보안 취약점이 존재합니다. 임시 파일을 생성할 때 파일 권한을 명시적으로 설정하지 않아, 로컬 시스템의 임시 디렉토리를 공유하는 다른 사용자가 업로드된 민감한 정보를 읽을 수 있는 정보 노출 위험이 있습니다.
💡 쉬운 설명
파일 업로드 기능을 사용할 때 임시로 저장되는 파일이 누구나 읽을 수 있는 설정으로 만들어지는 문제입니다. 이로 인해 같은 컴퓨터를 쓰는 다른 사람이 내가 올린 중요한 파일을 몰래 볼 수 있습니다.
🇺🇸 원문 (English)
Netty is an open-source, asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. In Netty before version 4.1.59.Final there is a vulnerability on Unix-like systems involving an insecure temp file. When netty's multipart decoders are used local information disclosure can occur via the local system temporary directory if temporary storing uploads on the disk is enabled. On unix-like systems, the temporary directory is shared between all user. As such, writing to this directory using APIs that do not explicitly set the file/directory permissions can lead to information disclosure. Of note, this does not impact modern MacOS Operating Systems. The method "File.createTempFile" on unix-like systems creates a random file, but, by default will create this file with the permissions "-rw-r--r--". Thus, if sensitive information is written to this file, other local users can read this information. This is the case in netty's "AbstractDiskHttpData" is vulnerable. This has been fixed in version 4.1.59.Final. As a workaround, one may specify your own "java.io.tmpdir" when you start the JVM or use "DefaultHttpDataFactory.setBaseDir(...)" to set the directory to something that is only readable by the current user.
📍 영향받는 시스템
Netty versions before 4.1.59.Final (on Unix-like systems)
⚔️ 공격 벡터
로컬 시스템의 임시 디렉토리에 접근 권한이 있는 다른 사용자가 생성된 임시 파일을 읽음
🛡️ 대응 방법
Netty를 4.1.59.Final 버전 이상으로 업데이트하거나, 임시 디렉토리를 권한이 제한된 별도의 경로로 설정함
🔧 검증 코드
출력된 Netty 버전이 4.1.59.Final 미만인지 확인하여 취약 여부를 판단합니다.
mvn dependency:tree | grep netty
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server