CVE-2026-5436: MW WP Form <= 5.1.1 - Unauthenticated Arbitrary File Move via regenerate_upload_file_keys
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 generateuserfiledirpath() function, which uses WordPress's pathjoin() — a function that returns absolute paths unchanged, discarding the intended base directory. The attacker-controlled key is injected via the mwfuploadfiles[] POST parameter, which is loaded into the plugin's Data model via setrequestvaliables(). During form processing, regenerateuploadfilekeys() iterates over these keys and calls generateuserfilepath() 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 getattachments() method then re-reads the same surviving keys and passes the resolved file path to movetempfiletouploaddir(), 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
MW WP Formto a version that resolves this vulnerability.Fixed in 5.1.1 - Compensating control
Mitigate exploitability by ensuring a MW WP Form upload field is not present in publicly accessible forms, or by disabling the form option “Saving inquiry data in database” (required for exploitation via mwf_upload_files[] and regenerate_upload_file_keys).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-5436?
CVE-2026-5436 is considered a medium severity vulnerability due to its potential for unauthorized file manipulation.
How do I fix CVE-2026-5436?
To fix CVE-2026-5436, update the MW WP Form plugin to version 5.1.2 or higher where the vulnerability is patched.
What is the impact of CVE-2026-5436?
The impact of CVE-2026-5436 allows unauthenticated users to move or read arbitrary files on the server.
Which versions of MW WP Form are affected by CVE-2026-5436?
CVE-2026-5436 affects all versions of MW WP Form up to and including 5.1.1.
Who is affected by CVE-2026-5436?
Any website using MW WP Form plugin version 5.1.1 or earlier is affected by CVE-2026-5436.