VT-2026-1357

WPvivid Backup & Migration - Unauthenticated Arbitrary File Upload to RCE

CRITICAL 9.8CVEwordpresswpvividphpcve-2026

Run this lab

$vt start --id vt-2026-1357

Lab not starting or behaving wrong? Report a problem with this lab

Summary

The Migration, Backup, Staging - WPvivid Backup & Migration plugin for WordPress is vulnerable to unauthenticated arbitrary file upload in versions up to and including 0.9.123. The vulnerability stems from improper error handling in the RSA decryption process combined with a lack of path sanitization when writing uploaded files. When openssl_private_decrypt() fails, execution continues and passes a boolean false value to phpseclib's AES cipher initialization, which interprets it as null bytes. This allows attackers to encrypt malicious payloads using a predictable null-byte key. Combined with unsanitized filenames that permit directory traversal, attackers can upload arbitrary PHP files to publicly accessible directories and achieve Remote Code Execution via the wpvivid_action=send_to_site parameter.

Technical detail

The vulnerability exists in the WPvivid plugin's remote site migration feature (wpvivid_action=send_to_site). Two bugs chain together: **Bug 1 - Cryptographic Fail-Open (class-wpvivid-crypt.php):** In decrypt_message(), RSA decryption failure returns false. The code does NOT check this return value and passes false to phpseclib's Crypt_Rijndael->setKey(). phpseclib casts false to empty string, padded with null bytes to 16 bytes. Attacker encrypts payload with known null key: AES-128-CBC(key=\x00*16, iv=\x00*16). **Bug 2 - Path Traversal (class-wpvivid-send-to-site.php):** In send_to_site(), the $params['name'] from decrypted JSON is used unsanitized: $file_path = WP_CONTENT_DIR . '/' . $dir . '/' . str_replace('wpvivid','wpvivid_temp',$params['name']); Using "../uploads/file.php" escapes the backup directory to wp-content/uploads/. **Exploit Chain:** 1. Send fake RSA key ("ABC") -> openssl_private_decrypt() fails -> returns false 2. phpseclib uses false as key -> becomes \x00*16 3. Attacker encrypts JSON payload with \x00*16 key -> server decrypts successfully 4. JSON name="../uploads/shell.php" -> path traversal writes to public directory 5. Uploaded PHP file is accessible -> RCE achieved

Impact

Successful exploitation allows unauthenticated remote attackers to upload arbitrary PHP files to the WordPress web root, achieving full Remote Code Execution (RCE) on the server. This can lead to complete site takeover, data exfiltration, backdoor installation, lateral movement within the hosting environment, and use of the compromised server for further attacks.

Exploitation & proof of concept

POST/param=wpvivid_contentunauthenticated

Precondition: wpvivid_api_token must exist in DB (migration key generated in plugin settings)

REQUEST
POST / HTTP/1.1
Host: {{target}}
Content-Type: application/x-www-form-urlencoded

wpvivid_action=send_to_site&wpvivid_content={{payload_base64}}
RESPONSE
HTTP/1.1 200 OK

{"result":"success","op":"finished"}
Payload is a binary packet: [3-char hex RSA key length][fake RSA key][16-char hex ciphertext length][AES-128-CBC encrypted JSON] - Fake RSA key (e.g. "ABC") triggers openssl_private_decrypt() failure -> returns false - phpseclib treats false as 16 null bytes (\x00*16) for AES key - Attacker encrypts JSON with same null key: AES-128-CBC(key=\x00*16, iv=\x00*16) - JSON contains path traversal in "name" field: "../uploads/shell.php" - File written to wp-content/uploads/ bypassing .htaccess protected backup dir

Nuclei detection: vt-2026-1357.nuclei.yaml

Remediation

  • Upgrade WPvivid Backup & Migration plugin to version 0.9.124 or later
  • Audit wp-content/uploads/ for unauthorized PHP files
  • Review access logs for POST requests with wpvivid_action=send_to_site
  • Consider disabling the migration key when not actively migrating
  • Implement WAF rules to block wpvivid_action=send_to_site from external sources

Lab setup notes

  • Start lab: docker compose up -d
  • Wait for setup container to complete (~30 seconds)
  • Access WordPress: http://localhost:8321
  • Admin login: admin / admin
  • WPvivid 0.9.123 is pre-installed and active with migration key generated
  • Run nuclei: nuclei -t vt-2026-1357.nuclei.yaml -u http://localhost:8321
  • Verify upload: curl http://localhost:8321/wp-content/uploads/vt-nuclei-test.txt

References