🇰🇷 한글 설명
PhpSpreadsheet 라이브러리의 Worksheet\Drawing::setPath 메서드에서 외부 이미지 URL 검증 시 리다이렉션을 제대로 처리하지 못하는 취약점이 발견되었습니다. 공격자는 허용된 호스트를 통해 내부 네트워크나 클라우드 메타데이터 엔드포인트로 리다이렉트시켜 Blind GET 요청을 유도할 수 있습니다. 이 문제는 1.30.7, 2.1.19, 2.4.8, 3.10.8, 5.10.0 버전에서 수정되었습니다.
💡 쉬운 설명
이미지 주소를 확인하는 과정에서 공격자가 만든 가짜 주소로 연결을 돌릴 수 있는 허점이 있습니다. 이를 통해 서버 내부의 중요한 정보가 담긴 주소에 몰래 접근을 시도할 수 있습니다.
🇺🇸 원문 (English)
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, Worksheet\Drawing::setPath validates only the initial external-image URL with setIsWhitelisted when setAllowExternalImages is enabled. The HTTP stream context permits PHP to follow a redirect without applying the callback to the redirected URL, so a permitted image host can redirect the server to an internal address and cause a blind GET request. The response body is not returned to the attacker because the reader validates the downloaded content as an image and removes the temporary file, but internal GET-driven endpoints, network reachability, and cloud metadata endpoints may be reached. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.
📍 영향받는 시스템
PhpSpreadsheet 1.30.7, 2.1.19, 2.4.8, 3.10.8, 5.10.0 미만 버전
⚔️ 공격 벡터
허용된 이미지 호스트를 이용한 HTTP 리다이렉션을 통한 내부 네트워크/클라우드 메타데이터 Blind GET 요청
🛡️ 대응 방법
PhpSpreadsheet를 최신 보안 패치 버전(1.30.7, 2.1.19, 2.4.8, 3.10.8, 5.10.0 이상)으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 취약점이 해결된 버전(1.30.7, 2.1.19, 2.4.8, 3.10.8, 5.10.0 중 해당 메이저 버전의 최신)보다 낮은지 확인하십시오.
composer show phpoffice/phpspreadsheet | grep 'versions'