🔍 CVE-2017-4995

8.1
CVSS Score
HIGH
2017-11-27
2026-06-17 01:19
✅ 완료

🇰🇷 한글 설명

Spring Security가 Jackson 라이브러리를 기본 타입 설정으로 활성화할 때, 신뢰할 수 없는 데이터 역직렬화 과정에서 알려지지 않은 gadget chain을 통해 임의 코드 실행이 가능한 취약점입니다. 사용자가 SecurityJackson2Modules API를 명시적으로 호출하고 신뢰할 수 없는 데이터를 역직렬화할 때 공격 조건이 충족됩니다.

💡 쉬운 설명

Spring 보안 라이브러리가 외부 데이터를 처리할 때 특정 형식의 악의적인 데이터를 받으면 해커가 원하는 프로그램을 자동으로 실행하게 되는 문제입니다. 이를 위해서는 개발자가 Spring의 특정 보안 기능을 명시적으로 사용하고 있어야 합니다.

🇺🇸 원문 (English)

An issue was discovered in Pivotal Spring Security 4.2.0.RELEASE through 4.2.2.RELEASE, and Spring Security 5.0.0.M1. When configured to enable default typing, Jackson contained a deserialization vulnerability that could lead to arbitrary code execution. Jackson fixed this vulnerability by blacklisting known "deserialization gadgets." Spring Security configures Jackson with global default typing enabled, which means that (through the previous exploit) arbitrary code could be executed if all of the following is true: (1) Spring Security's Jackson support is being leveraged by invoking SecurityJackson2Modules.getModules(ClassLoader) or SecurityJackson2Modules.enableDefaultTyping(ObjectMapper); (2) Jackson is used to deserialize data that is not trusted (Spring Security does not perform deserialization using Jackson, so this is an explicit choice of the user); and (3) there is an unknown (Jackson is not blacklisting it already) "deserialization gadget" that allows code execution present on the classpath. Jackson provides a blacklisting approach to protecting against this type of attack, but Spring Security should be proactive against blocking unknown "deserialization gadgets" when Spring Security enables default typing.

📍 영향받는 시스템

Spring Security 4.2.0.RELEASE ~ 4.2.2.RELEASE, 5.0.0.M1

⚔️ 공격 벡터

Jackson 역직렬화 gadget chain을 통한 원격 코드 실행 (RCE) - SecurityJackson2Modules 활성화 + 신뢰할 수 없는 데이터 처리

🛡️ 대응 방법

Spring Security를 4.2.3 이상 또는 5.0.0.RC1 이상의 최신 버전으로 업데이트하고 Jackson 블랙리스트 메커니즘 적용

🔧 검증 코드

4.2.0~4.2.2 또는 5.0.0.M1 버전이 출력되면 취약점 존재, 4.2.3 이상 또는 5.0.0.RC1 이상이면 패치됨

Shell / Script
grep -i 'spring.security' pom.xml 2>/dev/null | grep -oE 'version>[0-9.]+' | head -1

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Spring Security