🔍 CVE-2015-3412

5.3
CVSS Score
MEDIUM
2016-05-16
2026-05-06 22:30
✅ 완료

🇰🇷 한글 설명

PHP의 stream_resolve_include_path 함수가 null byte (%00)를 처리하지 않아 발생하는 취약점입니다. 공격자가 filename\0.extension 형식의 입력을 통해 파일 확장자 검증을 우회하고 임의의 파일을 읽을 수 있습니다.

💡 쉬운 설명

PHP 파일 읽기 함수가 숨겨진 문자(null byte)를 인식하지 못해서, 공격자가 파일명에 특수 문자를 섞어서 보호된 파일을 읽을 수 있는 취약점입니다. 예를 들어 .txt 파일만 읽도록 설정했어도 attacker가 조작된 이름으로 다른 파일을 열 수 있게 됩니다.

🇺🇸 원문 (English)

PHP before 5.4.40, 5.5.x before 5.5.24, and 5.6.x before 5.6.8 does not ensure that pathnames lack %00 sequences, which might allow remote attackers to read arbitrary files via crafted input to an application that calls the stream_resolve_include_path function in ext/standard/streamsfuncs.c, as demonstrated by a filename\0.extension attack that bypasses an intended configuration in which client users may read files with only one specific extension.

📍 영향받는 시스템

PHP 5.4.40 미만, PHP 5.5.0~5.5.23, PHP 5.6.0~5.6.7

⚔️ 공격 벡터

stream_resolve_include_path 함수를 사용하는 애플리케이션에 filename\0.extension 형식의 입력값 전달

🛡️ 대응 방법

PHP를 5.4.40, 5.5.24, 5.6.8 이상으로 업그레이드하거나 입력값 검증 필터 추가

🔧 검증 코드

PHP 버전이 5.4.40, 5.5.24, 5.6.8 이상이면 안전함. 5.6.7 이하 또는 5.5.23 이하면 취약함

Shell / Script
php -v 2>/dev/null | head -1

📊 CVSS Vector String

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

💻 영향받는 소프트웨어

PHP