Automated PoC for CVE-2026-123751 / CVE-2026-39755
# Duplicate2Shell
PoC for CVE-2026-123751: an unauthenticated file upload
in the WordPress plugin WP Duplicate (`local-sync`) up to 1.1.11. Uploaded files land in a
directory that executes PHP, so an upload is code execution.
The handler is hooked on `setup_theme`, so any URL reaches it. It compares the attacker's
`prod_key_random_id` against the stored id with `!=`. Send JSON `true` and PHP 8 casts the
non-numeric string to `true` by itself, so the check passes.
`handle_upload_single_big_file` then writes `file_data`, the hex of a zlib blob, to
`wp-content/uploads/local_sync/backups/` without looking at the extension.
## Usage
```
python3 duplicate2shell.py https://target.tld # shell prompt
python3 duplicate2shell.py https://target.tld --cmd 'id' # one command
python3 duplicate2shell.py https://target.tld --detect-only # version check
python3 duplicate2shell.py https://target.tld --cleanup # delete on exit
```
The script reads the plugin version first and stops on a patched build unless you pass
`--force`. It uploads, echoes a nonce back to prove execution, then gives you a prompt.
Type `:rm` to delete the shell and quit, `:q` to keep it.
Standard library Python 3. Nothing to install.
## The shell
Around half a kilobyte of PHP. A bare visit prints identity, kernel, PHP version, docroot,
writability, `open_basedir` and `disable_functions`. `?c=` runs the command through
`/bin/sh -c` and streams the result as `text/plain`.
Every request is a new process, so `cd`, `export` and quoting have to sit inside each
command.
## Cleanup
`--cleanup`, or `:rm` at the prompt. Both remove the uploaded file and check the URL
returns 404. Nothing else is touched: no plugin files, no `wp-config.php`, no cron.
## Notes
The bypass needs PHP 8 and does nothing on PHP 7.
Use `passthru`, not a bare `exec`. Where `exec()` does not echo without its output array,
an `exec` only shell uploads fine and answers with silence.
To spot it in a log, l