🇰🇷 한글 설명
PhpSpreadsheet 라이브러리에서 XML 처리 과정 중 이중 인코딩된 문자가 필터링을 우회하여 DOCTYPE 및 엔티티 선언을 허용하는 취약점이 발견되었습니다. 이를 통해 공격자가 조작된 XML 파일을 처리하게 할 경우 서비스 거부(DoS), 로컬 파일 접근 또는 SSRF 공격이 가능합니다.
💡 쉬운 설명
엑셀 파일을 읽는 프로그램이 특수하게 조작된 파일을 읽을 때 보안 검사를 통과해 버리는 문제입니다. 이로 인해 컴퓨터의 파일을 몰래 읽거나 시스템을 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. From 3.3.0 until 3.10.8 and 5.10.0, Reader\Xml passes stored SpreadsheetML XML through XmlScanner::scan in Xml::canRead and Xml::trySimpleXMLLoadStringPrivate, while Xml::unentity decodes numeric entities only after each DOCTYPE pattern check. A double-encoded less-than character is reduced by the first callback to another encoded character and by the second callback to a literal less-than sign, so SimpleXML receives an unchecked DOCTYPE and entity declaration. Processing attacker-controlled SpreadsheetML XML can cause entity-expansion denial of service and can permit local file access or SSRF on PHP before 8.0 or when LIBXML_NOENT is enabled. This issue is fixed in versions 3.10.8 and 5.10.0.
📍 영향받는 시스템
PhpSpreadsheet 3.3.0 ~ 3.10.8 및 5.10.0 미만 버전
⚔️ 공격 벡터
공격자가 조작된 SpreadsheetML XML 파일을 업로드하거나 처리하도록 유도
🛡️ 대응 방법
PhpSpreadsheet를 3.10.8 또는 5.10.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 3.10.8 또는 5.10.0보다 낮은지 확인
composer show phpoffice/phpspreadsheet | grep 'versions'