🇰🇷 한글 설명
Zumba Json Serializer 라이브러리 3.2.2 이하 버전에서 @type 필드를 통해 제한 없이 임의의 PHP 클래스를 인스턴스화할 수 있는 역직렬화 취약점입니다. 공격자가 제어하는 JSON 입력이 JsonSerializer::unserialize()로 전달되면 위험한 매직 메서드(__wakeup(), __destruct())를 가진 클래스를 실행시켜 PHP Object Injection 및 원격코드실행(RCE)으로 이어질 수 있습니다.
💡 쉬운 설명
이 라이브러리는 JSON 데이터를 처리할 때 공격자가 원하는 프로그램 코드를 실행하도록 허용합니다. 악의적인 JSON을 입력하면 서버가 완전히 장악될 수 있습니다.
🇺🇸 원문 (English)
Zumba Json Serializer is a library to serialize PHP variables in JSON format. In versions 3.2.2 and below, the library allows deserialization of PHP objects from JSON using a special @type field. The deserializer instantiates any class specified in the @type field without restriction. When processing untrusted JSON input, this behavior may allow an attacker to instantiate arbitrary classes available in the application. If a vulnerable application passes attacker-controlled JSON into JsonSerializer::unserialize() and contains classes with dangerous magic methods (such as __wakeup() or __destruct()), this may lead to PHP Object Injection and potentially Remote Code Execution (RCE), depending on available gadget chains in the application or its dependencies. This behavior is similar in risk profile to PHP's native unserialize() when used without the allowed_classes restriction. Applications are impacted only if untrusted or attacker-controlled JSON is passed into JsonSerializer::unserialize() and the application or its dependencies contain classes that can be leveraged as a gadget chain. This issue has been fixed in version 3.2.3. If an immediate upgrade isn't feasible, mitigate the vulnerability by never deserializing untrusted JSON with JsonSerializer::unserialize(), validating and sanitizing all JSON input before deserialization, and disabling @type-based object instantiation wherever possible.
📍 영향받는 시스템
Zumba Json Serializer 버전 3.2.2 이하
⚔️ 공격 벡터
공격자가 제어하는 JSON 입력을 JsonSerializer::unserialize()로 전달하여 @type 필드 기반 임의 클래스 인스턴스화 및 매직 메서드 실행
🛡️ 대응 방법
버전 3.2.3 이상으로 즉시 업그레이드, 또는 신뢰할 수 없는 JSON 입력의 역직렬화 금지 및 모든 입력 검증
🔧 검증 코드
버전이 3.2.3 이상이면 안전, 3.2.2 이하면 즉시 업그레이드 필요
grep -A 2 'zumba/json-serializer' composer.lock 2>/dev/null | grep '"version"'