🇰🇷 한글 설명
http4k 라이브러리의 Gzip 압축 해제 기능에서 압축 해제된 데이터 크기에 대한 제한이 없어 발생하는 취약점입니다. 인증되지 않은 공격자가 매우 작은 압축 파일을 보내 수 기가바이트의 메모리를 소모하게 함으로써 JVM 힙 메모리를 고갈시키고 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
압축된 작은 파일을 보냈을 때 서버가 이를 풀면서 엄청나게 큰 데이터로 만들어버려 서버의 메모리를 모두 써버리는 문제입니다. 이로 인해 서버가 멈추거나 다른 사용자가 서비스를 이용할 수 없게 됩니다.
🇺🇸 원문 (English)
http4k is a functional toolkit for Kotlin HTTP applications. Prior to 4.51.0.0, 5.42.0.0, and 6.49.0.0, ServerFilters.GZip, RequestFilters.GunZip, and the underlying Gzip request-body decompression functions impose no limit on decompressed size. An unauthenticated client can send a small gzip-encoded request body that expands to gigabytes, exhausting the JVM heap and denying service to other clients. The fix uses SizeLimitedInputStream to enforce a default 10 MiB limit, causes ServerFilters.GZip and RequestFilters.GunZip to return 413 Request Entity Too Large, and causes other decompression paths to throw SizeLimitExceededException. This issue is fixed in versions 4.51.0.0, 5.42.0.0, and 6.49.0.0.
📍 영향받는 시스템
http4k versions prior to 4.51.0.0, 5.42.0.0, and 6.49.0.0
⚔️ 공격 벡터
인증되지 않은 클라이언트가 압축 해제 시 크기가 급격히 늘어나는 Gzip 인코딩된 요청 본문을 전송
🛡️ 대응 방법
http4k를 4.51.0.0, 5.42.0.0 또는 6.49.0.0 이상의 버전으로 업데이트
🔧 검증 코드
출력된 결과에서 사용 중인 http4k 버전이 취약한 버전 범위에 포함되는지 확인합니다.
grep -r "http4k" . | grep -E '4\[0-9]\.[0-9]{2}\.[0-9]{2}|5\.[0-4][0-9]\.[0-9]{2}|6\.[4-9][0-9]\.[0-9]{2}'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server