🇰🇷 한글 설명
XStream 1.4.20 미만 버전에서 발생하는 취약점으로, 조작된 입력 스트림을 통해 재귀적인 해시 계산을 유도하여 스택 오버플로를 발생시킬 수 있습니다. 공격자는 이를 통해 애플리케이션을 강제로 종료시켜 서비스 거부(DoS) 상태를 유발할 수 있습니다.
💡 쉬운 설명
악의적으로 조작된 데이터를 보내 프로그램이 스스로 계산을 반복하다가 과부하로 멈추게 만드는 공격입니다. 이로 인해 서비스가 중단되어 사용자들이 이용할 수 없게 됩니다.
🇺🇸 원문 (English)
XStream serializes Java objects to XML and back again. Versions prior to 1.4.20 may allow a remote attacker to terminate the application with a stack overflow error, resulting in a denial of service only via manipulation the processed input stream. The attack uses the hash code implementation for collections and maps to force recursive hash calculation causing a stack overflow. This issue is patched in version 1.4.20 which handles the stack overflow and raises an InputManipulationException instead. A potential workaround for users who only use HashMap or HashSet and whose XML refers these only as default map or set, is to change the default implementation of java.util.Map and java.util per the code example in the referenced advisory. However, this implies that your application does not care about the implementation of the map and all elements are comparable.
📍 영향받는 시스템
XStream versions prior to 1.4.20
⚔️ 공격 벡터
조작된 XML 입력 스트림을 통한 재귀적 해시 계산 유도 (Denial of Service)
🛡️ 대응 방법
XStream을 1.4.20 이상의 버전으로 업데이트하거나, Map/Set의 기본 구현체를 변경하는 워크아라운드를 적용하십시오.
🔧 검증 코드
출력된 XStream 버전이 1.4.20 미만이면 취약한 상태입니다.
find / -name "xstream*.jar" 2>/dev/null | xargs grep -E '"version" : "[0-9]+\.[0-9]+\.[0-9]+"' 2>/dev/null