🇰🇷 한글 설명
mchange-commons-java는 c3p0 커넥션 풀 등 mchange 프로젝트에서 사용하는 공유 유틸리티 라이브러리입니다. 0.6.0 이전 버전의 JNDI ObjectFactory 구현(JavaBeanObjectFactory)은 임의의 클래스 객체를 생성하고 JavaBean 속성을 초기화하여, 특정 클래스에서 JNDI 인젝션 및 역직렬화 가젯을 유발할 수 있습니다. 이 문제는 ReferenceIndirector를 통해 더욱 심화되며, 0.6.0 버전에서 해결되었습니다.
💡 쉬운 설명
이 취약점은 공격자가 악성 설정 정보를 주입하여 서버가 의도하지 않은 동작을 수행하게 만들 수 있습니다. 적용된 업데이트를 통해 해당 위험을 제거할 수 있습니다.
🇺🇸 원문 (English)
mchange-commons-java is a Java library of shared utility classes used by mchange projects like the c3p0 connection pool. Prior to version 0.6.0, its JNDI ObjectFactory implementation (com.mchange.v2.naming.JavaBeanObjectFactory) will construct objects of arbitrary classes and initialize "JavaBean"-style properties, which for certain classes enables JNDI injection and "deserialization gadgets." Such initialization is unsafe for some classes: for example, setting the contentType property of a Swing JEditorPane to text/html and its text property to HTML containing a stylesheet <link> will provoke an HTTP GET on an arbitrary URL, potentially from within a trusted security domain. The problem is aggravated by the library's ReferenceIndirector, through which malicious JNDI Reference objects can be smuggled in for dereferencing wherever an application reads a Java-serialized object. This has been resolved in version 0.6.0.
📍 영향받는 시스템
mchange-commons-java 0.6.0 미만 버전을 사용하는 c3p0 등 mchange 기반 Java 애플리케이션
⚔️ 공격 벡터
악성 JNDI Reference 객체를 주입하여 JavaBean 속성 초기화 과정에서 원격 리소스 요청 또는 역직렬화 가젯을 실행
🛡️ 대응 방법
mchange-commons-java를 0.6.0 이상 버전으로 업그레이드
🔧 검증 코드
출력된 JAR 파일명 또는 MANIFEST의 버전이 0.6.0 미만이면 취약하며, 0.6.0 이상이면 조치된 것입니다.
find / -name 'mchange-commons-java*.jar' 2>/dev/null | xargs -I{} sh -c 'echo {}; unzip -p {} META-INF/MANIFEST.MF 2>/dev/null | grep -i version'