🇰🇷 한글 설명
WordPress EmailKit 플러그인 1.6.5 버전 이하에서 경로 검증 로직의 결함으로 인한 임의 파일 읽기 취약점. realpath() 함수가 false를 반환할 때 PHP 8.x의 암묵적 타입 변환으로 경로 검증이 우회되어, Author 권한 이상의 인증된 사용자가 wp-config.php 등 민감 파일을 읽을 수 있습니다.
💡 쉬운 설명
WordPress 이메일 플러그인의 파일 접근 제한이 제대로 작동하지 않아서, 권한 있는 사용자가 서버의 중요한 설정 파일을 읽을 수 있는 보안 문제입니다. PHP 8 버전에서만 발생합니다.
🇺🇸 원문 (English)
The EmailKit plugin for WordPress is vulnerable to Arbitrary File Read in all versions up to and including 1.6.5. This is due to a flawed path traversal validation in the create_template() method of the CheckForm class, where realpath() is called on the allowed base directory (wp-content/uploads/emailkit/templates/) which may not exist, causing it to return false. In PHP 8.x, strpos($real_path, false) implicitly converts false to an empty string, and strpos() with an empty needle always returns 0, causing the check strpos(...) !== 0 to evaluate to false and bypassing the path validation entirely. This makes it possible for authenticated attackers, with Author-level access and above, to read arbitrary files from the server, including sensitive files such as wp-config.php, by supplying an absolute path to the emailkit-editor-template REST API parameter.
📍 영향받는 시스템
WordPress EmailKit plugin ≤ 1.6.5 on PHP 8.x
⚔️ 공격 벡터
emailkit-editor-template REST API 매개변수에 절대 경로를 입력하여 임의 파일 읽기 (Author 권한 이상 필요)
🛡️ 대응 방법
EmailKit 플러그인을 1.6.6 이상으로 업데이트
🔧 검증 코드
Version 필드 값이 1.6.5 이하면 취약함. 파일이 없으면 플러그인 미설치
grep -r 'Version:' /var/www/html/wp-content/plugins/emailkit/readme.txt 2>/dev/null