🇰🇷 한글 설명
WordPress의 'The AI Engine' 플러그인(버전 3.3.2 이하)에서 rest_helpers_update_media_metadata 함수의 파일 타입 검증 부족으로 Editor 권한 이상의 인증된 공격자가 임의 파일을 업로드할 수 있습니다. 업로드된 이미지를 update_media_metadata 엔드포인트로 PHP 파일로 이름 변경하여 원격 코드 실행이 가능합니다.
💡 쉬운 설명
WordPress 플러그인에서 파일 업로드 시 확장자를 제대로 검증하지 않아 위험한 PHP 파일을 서버에 저장할 수 있습니다. 이를 통해 공격자가 서버에서 악의적인 코드를 직접 실행할 수 있게 됩니다.
🇺🇸 원문 (English)
The AI Engine – The Chatbot and AI Framework for WordPress plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the `rest_helpers_update_media_metadata` function in all versions up to, and including, 3.3.2. This makes it possible for authenticated attackers, with Editor-level access and above, to upload arbitrary files on the affected site's server which may make remote code execution possible. The attacker can upload a benign image file, then use the `update_media_metadata` endpoint to rename it to a PHP file, creating an executable PHP file in the uploads directory.
📍 영향받는 시스템
The AI Engine – The Chatbot and AI Framework for WordPress 플러그인 3.3.2 버전 이하
⚔️ 공격 벡터
Editor 이상 권한의 인증된 사용자가 이미지 업로드 후 update_media_metadata REST 엔드포인트를 통해 파일 확장자를 PHP로 변경
🛡️ 대응 방법
플러그인을 최신 버전으로 즉시 업데이트하고 필요시 Editor 권한 사용자에 대한 파일 업로드 권한 재검토
🔧 검증 코드
플러그인이 설치/활성화 상태이면 버전 확인; 3.3.2 이하면 취약한 상태임
wp plugin list --status=active | grep -i 'ai-engine' && wp plugin get ai-engine --field=version