🇰🇷 한글 설명
WordPress의 MW WP Form 플러그인 5.1.1 이하 버전에서 발생하는 임의 파일 이동 및 읽기 취약점입니다. $name 파라미터에 대한 검증 미흡으로 인해 공격자가 조작된 경로를 주입하여 서버 내 임의의 파일을 업로드 디렉토리로 이동시킬 수 있습니다. 이는 wp-config.php와 같은 민감한 파일을 이동시켜 원격 코드 실행(RCE)으로 이어질 수 있습니다.
💡 쉬운 설명
웹사이트의 문의 양식 기능을 악용하여 해커가 서버에 있는 중요한 파일을 마음대로 옮길 수 있는 보안 구멍입니다. 이 과정을 통해 해커가 웹사이트의 관리자 권한을 탈취하거나 서버를 완전히 장악할 수 있습니다.
🇺🇸 원문 (English)
The MW WP Form plugin for WordPress is vulnerable to Arbitrary File Move/Read in all versions up to and including 5.1.1. This is due to insufficient validation of the $name parameter (upload field key) passed to the generate_user_file_dirpath() function, which uses WordPress's path_join() — a function that returns absolute paths unchanged, discarding the intended base directory. The attacker-controlled key is injected via the mwf_upload_files[] POST parameter, which is loaded into the plugin's Data model via _set_request_valiables(). During form processing, regenerate_upload_file_keys() iterates over these keys and calls generate_user_filepath() with the attacker-supplied key as the $name argument — the key survives validation because the targeted file (e.g., wp-config.php) genuinely exists at the absolute path. The _get_attachments() method then re-reads the same surviving keys and passes the resolved file path to move_temp_file_to_upload_dir(), which calls rename() to move the file into the uploads folder. This makes it possible for unauthenticated attackers to move arbitrary files on the server, which can easily lead to remote code execution when the right file is moved (such as wp-config.php). The vulnerability is only exploitable if a file upload field is added to the form and the “Saving inquiry data in database” option is enabled.
📍 영향받는 시스템
WordPress MW WP Form plugin (version 5.1.1 and below)
⚔️ 공격 벡터
mwf_upload_files[] POST 파라미터를 통한 경로 조작 및 파일 이동 공격
🛡️ 대응 방법
MW WP Form 플러그인을 최신 버전으로 업데이트하거나, 취약한 설정(파일 업로드 필드 및 데이터베이스 저장 옵션)을 비활성화하십시오.
🔧 검증 코드
출력된 결과에서 MW WP Form의 버전을 확인하여 5.1.1 이하인지 체크하십시오.
wp plugin list --status=active | grep -i 'mw-wp-form'