🇰🇷 한글 설명
WordPress SureMail 플러그인의 이메일 첨부파일 검증 부재로 인한 취약점입니다. 업로드 디렉토리 보호가 Apache 기반이라 nginx, IIS 등에서 무시되며, 예측 가능한 파일명으로 PHP 파일을 직접 실행할 수 있어 원격 코드 실행이 가능합니다.
💡 쉬운 설명
WordPress 메일 플러그인이 위험한 파일을 필터링 없이 저장하고, 일부 서버에서는 이 파일들이 실행될 수 있어 해킹이 가능합니다. 누구나 공개 메일 폼을 통해 악성 파일을 업로드하고 실행할 수 있습니다.
🇺🇸 원문 (English)
The SureMail – SMTP and Email Logs Plugin for WordPress is vulnerable to Unrestricted Upload of File with Dangerous Type in versions up to and including 1.9.0. This is due to the plugin's save_file() function in inc/emails/handler/uploads.php which duplicates all email attachments to a web-accessible directory (wp-content/uploads/suremails/attachments/) without validating file extensions or content types. Files are saved with predictable names derived from MD5 hashes of their content. While the plugin attempts to protect this directory with an Apache .htaccess file to disable PHP execution, this protection is ineffective on nginx, IIS, and Lighttpd servers, or on misconfigured Apache installations. This makes it possible for unauthenticated attackers to achieve Remote Code Execution by uploading malicious PHP files through any public form that emails attachments, calculating the predictable filename, and directly accessing the file to execute arbitrary code granted they are exploiting a site running on an affected web server configuration.
📍 영향받는 시스템
SureMail – SMTP and Email Logs Plugin for WordPress 버전 1.9.0 이하
⚔️ 공격 벡터
공개 이메일 폼에 악성 PHP 파일을 첨부파일로 업로드 → MD5 기반 예측된 파일명으로 직접 접근 → PHP 코드 실행
🛡️ 대응 방법
플러그인을 1.9.1 이상으로 업그레이드하거나 플러그인 비활성화 및 삭제
🔧 검증 코드
1.9.0 이하의 버전이 출력되면 취약하며, 1.9.1 이상이면 안전합니다. 플러그인이 없으면 출력이 없습니다.
grep -m1 'Version:' wp-content/plugins/suremails/suremails.php 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'