🔍 CVE-2007-4782

5.0
CVSS Score
MEDIUM
2007-09-10
2026-04-23 00:35
✅ 완료

🇰🇷 한글 설명

PHP 5.2.3 이전 버전의 glob() 함수와 fnmatch() 함수에서 과도하게 긴 입력 문자열로 인한 애플리케이션 크래시(DoS)가 발생합니다. 패턴 매칭 처리 중 비정상적인 입력값이 무한 루프나 과도한 메모리 사용을 유발합니다.

💡 쉬운 설명

PHP의 파일 찾기 함수들이 너무 긴 텍스트를 받으면 프로그램이 멈춥니다. 멀티스레드 환경의 웹 서버에서는 일부 요청만 영향받지만 단일 스레드 환경에서는 전체 서비스가 중단될 수 있습니다.

🇺🇸 원문 (English)

PHP before 5.2.3 allows context-dependent attackers to cause a denial of service (application crash) via (1) a long string in the pattern parameter to the glob function; or (2) a long string in the string parameter to the fnmatch function, accompanied by a pattern parameter value with undefined characteristics, as demonstrated by a "*[1]e" value. NOTE: this might not be a vulnerability in most web server environments that support multiple threads, unless these issues can be demonstrated for code execution.

📍 영향받는 시스템

PHP 5.2.3 이전 모든 버전 (5.0.x, 5.1.x, 5.2.0~5.2.2)

⚔️ 공격 벡터

glob() 함수의 pattern 파라미터 또는 fnmatch() 함수의 string 파라미터에 매우 긴 문자열을 전달하여 DoS 유발

🛡️ 대응 방법

PHP를 5.2.3 이상으로 업그레이드하거나 사용자 입력의 길이 제한 구현 (예: 최대 길이 설정)

🔧 검증 코드

출력된 PHP 버전 번호가 5.2.3 미만(5.2.2 이하, 5.1.x, 5.0.x)이면 취약 상태입니다.

Shell / Script
php -v 2>/dev/null | grep -oP 'PHP \d+\.\d+\.\d+' | head -1

📊 CVSS Vector String

CVSS Vector
AV:N/AC:L/Au:N/C:N/I:N/A:P

💻 영향받는 소프트웨어

PHP