🇰🇷 한글 설명
OGNL 3.4.13 미만 버전의 stricter-invocation 모드에서 자바 리플렉션 객체(Method, Constructor, Field)를 통한 보안 검사 우회 취약점이 발견되었습니다. 공격자가 제어하는 OGNL 표현식을 통해 차단된 클래스의 메서드를 리플렉션 객체를 대리자로 사용하여 실행할 수 있습니다. 이 문제는 3.4.13 버전에서 수정되었습니다.
💡 쉬운 설명
보안 검사 시스템이 특정 동작을 막으려 하지만, 공격자가 '거울(리플렉션)'을 이용해 검사망을 피해 몰래 명령을 실행하는 방식입니다. 신뢰할 수 없는 코드를 실행하는 프로그램에서 보안 벽을 뚫고 위험한 동작을 수행할 수 있습니다.
🇺🇸 원문 (English)
OGNL is an Object Graph Navigation Library for Java. Prior to 3.4.13, the optional stricter-invocation mode in OgnlRuntime.invokeMethod checks the declaring class of the method that OGNL invokes but does not block java.lang.reflect.Method, java.lang.reflect.Constructor, or java.lang.reflect.Field. An attacker-controlled expression can invoke one of these reflection objects as a proxy for a method on a blocked class, causing the real operation to execute inside JDK reflection without passing through the stricter-invocation check again. Exploitation requires an application to evaluate untrusted OGNL expressions, use the default or an equivalently permissive MemberAccess that permits reflection, and rely on stricter invocation as a sandbox. Applications using a restrictive MemberAccess, including Apache Struts with SecurityMemberAccess, are not affected by this bypass. This issue is fixed in 3.4.13.
📍 영향받는 시스템
OGNL Library versions prior to 3.4.13 (Apache Struts with SecurityMemberAccess is not affected)
⚔️ 공격 벡터
신뢰할 수 없는 OGNL 표현식을 입력하여 자바 리플렉션 객체를 통해 차단된 메서드를 호출
🛡️ 대응 방법
OGNL 라이브러리를 3.4.13 이상의 최신 버전으로 업데이트하거나 제한적인 MemberAccess 설정을 적용
🔧 검증 코드
출력된 결과에서 ognl 라이브러리의 버전이 3.4.13 미만인지 확인
mvn dependency:list | grep ognl