🇰🇷 한글 설명
Apache Tomcat의 특정 버전에서 PersistenceManager의 FileStore를 사용할 때 발생하는 역직렬화 취약점입니다. 공격자가 서버 내 파일의 이름과 내용을 제어할 수 있고 특정 설정이 되어 있다면, 조작된 요청을 통해 원격 코드 실행(RCE)이 가능합니다.
💡 쉬운 설명
서버가 저장된 파일을 읽어오는 과정에서 악성 코드가 담긴 파일을 읽게 만들어 컴퓨터를 원격으로 조종할 수 있는 문제입니다. 공격자가 서버에 파일을 올릴 수 있는 권한이 있고 특정 설정이 느슨할 때 발생합니다.
🇺🇸 원문 (English)
When using Apache Tomcat versions 10.0.0-M1 to 10.0.0-M4, 9.0.0.M1 to 9.0.34, 8.5.0 to 8.5.54 and 7.0.0 to 7.0.103 if a) an attacker is able to control the contents and name of a file on the server; and b) the server is configured to use the PersistenceManager with a FileStore; and c) the PersistenceManager is configured with sessionAttributeValueClassNameFilter="null" (the default unless a SecurityManager is used) or a sufficiently lax filter to allow the attacker provided object to be deserialized; and d) the attacker knows the relative file path from the storage location used by FileStore to the file the attacker has control over; then, using a specifically crafted request, the attacker will be able to trigger remote code execution via deserialization of the file under their control. Note that all of conditions a) to d) must be true for the attack to succeed.
📍 영향받는 시스템
Apache Tomcat 10.0.0-M1 ~ 10.0.0-M4, 9.0.0.M1 ~ 9.0.34, 8.5.0 ~ 8.5.54, 7.0.0 ~ 7.0.103
⚔️ 공격 벡터
FileStore를 사용하는 PersistenceManager 환경에서 조작된 파일 경로를 포함한 요청을 보내 역직렬화 유도
🛡️ 대응 방법
Tomcat을 최신 보안 패치 버전으로 업데이트하거나 sessionAttributeValueClassNameFilter 설정을 강화하여 허용되지 않은 클래스의 역직렬화를 차단해야 합니다.
🔧 검증 코드
출력된 Server number가 취약한 버전 범위(예: 9.0.34 이하 등)에 포함되는지 확인합니다.
find / -name tomcat* 2>/dev/null | xargs -I {} {}/bin/version | grep -E 'Server number'