🇰🇷 한글 설명
c3p0 JDBC 커넥션 풀 라이브러리 0.14.0 미만 버전에서 발생하는 역직렬화 취약점입니다. 공격자가 조작된 DataSource 객체를 직렬화하여 전달하면, 애플리케이션이 이를 역직렬화하고 JavaBean 속성을 자동으로 조회하는 과정에서 취약한 JDBC 드라이버를 호출하여 공격이 실행됩니다.
💡 쉬운 설명
데이터를 읽어오는 과정에서 악성 코드가 숨겨진 설정 파일을 처리할 때, 프로그램이 자동으로 잘못된 명령을 실행하게 만드는 보안 결함입니다. 이를 통해 공격자는 시스템에 원치 않는 동작을 수행하게 할 수 있습니다.
🇺🇸 원문 (English)
c3p0 is a JDBC Connection pooling library. In versions prior to 0.14.0, c3p0 in combination with other libraries, can compose to a "sink" for deserialization gadgets. The JDBC spec's DataSource.getConnection() and ConnectionPoolDataSource.getPooledConnection() match the getXXX() form, so JavaBean libraries treat them as "properties" assumed safe while they actually call into JDBC drivers. Attackers can thus craft malicious DataSource objects whose property lookups invoke vulnerable drivers, then smuggle them in serialized form to where an application deserializes and auto-resolves bean properties — triggering the attack. This requires a susceptible DataSource/ConnectionPoolDataSource and JDBC driver on the CLASSPATH, plus a carrier that auto-looks-up JavaBean properties on = deserialization, most commonly a collection paired with an Apache commons-beanutils Comparator that sorts by bean properties. c3p0 supplied that susceptible DataSource/ConnectionPoolDataSource, which was an essential component of the trigger. This issue has been fixed in version 0.14.0.
📍 영향받는 시스템
c3p0 versions prior to 0.14.0
⚔️ 공격 벡터
조작된 직렬화 객체를 전송하여 역직렬화 시 JavaBean 속성 조회를 유도하는 방식
🛡️ 대응 방법
c3p0 라이브러리를 0.14.0 이상 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 JAR 파일의 파일명이나 내부 Manifest 정보를 확인하여 버전이 0.14.0 미만인지 확인합니다.
find / -name "c3p0*.jar" 2>/dev/null | xargs grep -H "c3p0"