🇰🇷 한글 설명
SimpleSAMLphp-casserver 7.0.3 이전 버전은 파일 기반 CAS 티켓 저장소 경로 생성 시 공격자가 제어할 수 있는 티켓 식별자를 직접 연결하여 경로 조작 취약점이 존재합니다. 이를 통해 원격 공격자는 티켓 디렉토리 외부의 파일을 읽거나 역직렬화할 수 있으며, CAS 1.0 검증 흐름에서는 대상 파일을 삭제할 수도 있습니다.
💡 쉬운 설명
이 취약점은 시스템이 파일 위치를 찾을 때 공격자가 임의의 파일 경로를 지정할 수 있게 해줍니다. 결과적으로 공격자는 민감한 파일을 읽거나 역직렬화하여 코드를 실행할 수 있으며, 경우에 따라 파일을 삭제할 수도 있습니다.
🇺🇸 원문 (English)
SimpleSAMLphp-casserver is a CAS 1.0 and 2.0 compliant CAS server in the form of a SimpleSAMLphp module. Prior to version 7.0.3, simplesamlphp-module-casserver builds file paths for the file-based CAS ticket store by directly concatenating the configured ticket directory with an attacker-controlled ticket identifier. Public CAS validation/proxy endpoints pass attacker-controlled ticket / pgt query parameters into this store. In deployments using FileSystemTicketStore, a remote attacker can use path traversal sequences such as ../target.serialized to make the CAS server read and unserialize files outside the ticket directory. In the CAS 1.0 validation flow, the same attacker-selected path is also passed to deleteTicket() immediately after getTicket() returns, which can delete the target file when it is readable by the PHP process, deletable under the PHP process filesystem permissions, and unserializes to a value compatible with the ?array return type. This issue has been patched in version 7.0.3.
📍 영향받는 시스템
SimpleSAMLphp-casserver 모듈 버전 7.0.3 미만
⚔️ 공격 벡터
공격자가 조작한 티켓 파라미터를 통해 경로 조작 시퀀스를 전송하여 원격에서 파일 읽기, 역직렬화 또는 삭제를 수행
🛡️ 대응 방법
SimpleSAMLphp-casserver 모듈을 버전 7.0.3 이상으로 즉시 업그레이드하십시오.
🔧 검증 코드
출력된 버전 번호가 7.0.3보다 작은 경우 취약한 버전이므로 패치 필요
grep -r 'version' /path/to/simplesamlphp/modules/casserver/composer.json 2>/dev/null | grep -oP '"version":\s*"\K[^"]+'