MW WP Form <= 5.1.1 - Unauthenticated Arbitrary File Move via regenerate_upload_file_keys

8.1
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CVE CVE-2026-5436
CVSS 8.1 (High)
Publicly Published April 8, 2026
Last Updated April 15, 2026
Researcher Sander Horsman - Conda Security

Description

The MW WP Form plugin for WordPress is vulnerable to Arbitrary File Move/Read in all versions up to and including 5.1.1. This is due to insufficient validation of the $name parameter (upload field key) passed to the generate_user_file_dirpath() function, which uses WordPress's path_join() — a function that returns absolute paths unchanged, discarding the intended base directory. The attacker-controlled key is injected via the mwf_upload_files[] POST parameter, which is loaded into the plugin's Data model via _set_request_valiables(). During form processing, regenerate_upload_file_keys() iterates over these keys and calls generate_user_filepath() with the attacker-supplied key as the $name argument — the key survives validation because the targeted file (e.g., wp-config.php) genuinely exists at the absolute path. The _get_attachments() method then re-reads the same surviving keys and passes the resolved file path to move_temp_file_to_upload_dir(), which calls rename() to move the file into the uploads folder. This makes it possible for unauthenticated attackers to move arbitrary files on the server, which can easily lead to remote code execution when the right file is moved (such as wp-config.php). The vulnerability is only exploitable if a file upload field is added to the form and the “Saving inquiry data in database” option is enabled.

References

Share

Vulnerability Details for MW WP Form

Software Type Plugin
Software Slug mw-wp-form (view on wordpress.org)
Patched? Yes
Remediation Update to version 5.1.2, or a newer patched version
Affected Version
  • <= 5.1.1
Patched Version
  • 5.1.2

Recent vulnerabilities in MW WP Form

# Title CVE ID CVSS Researchers Date
1 MW WP Form <= 5.1.3 - Authenticated (Editor+) Stored Cross-Site Scripting via 'memo' Parameter CVE-2026-8853 4.4 Sérgio Charruadas (itzvenom) June 9, 2026
2 MW WP Form <= 5.1.3 - Unauthenticated Stored Cross-Site Scripting CVE-2026-48871 7.2 VanTastic June 1, 2026
3 MW WP Form <= 5.1.2 - Insecure Direct Object Reference to Unauthenticated Sensitive Information Disclosure via 'post_id' Query Parameter CVE-2026-6206 5.3 Kirasec May 13, 2026
4 MW WP Form <= 5.1.0 - Unauthenticated Arbitrary File Move via move_temp_file_to_upload_dir CVE-2026-4347 8.1 ISMAILSHADOW April 1, 2026
5 MW WP Form <= 5.0.6 - Authenticated (Editor+) Stored Cross-Site Scripting CVE-2024-24804 5.5 Huynh Tien Si January 31, 2024
6 MW WP Form <= 5.0.3 - Improper Limitation of File Name to Unauthenticated Arbitrary File Deletion CVE-2023-6559 7.5 Thomas Sanzey December 15, 2023
7 MW WP Form <= 5.0.1 - Unauthenticated Arbitrary File Upload CVE-2023-6316 9.8 István Márton December 4, 2023
8 MW WP Form <= 4.4.5 - Missing Authorization CVE-2023-46206 5.3 Revan Arifio October 19, 2023
9 MW WP Form <= 4.4.2 - Directory Traversal via _file_upload CVE-2023-28409 5.3 Shuya Ota May 8, 2023

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation