Description
The WP Libre Form WordPress plugin 1.5.0.1 does not validate the type of files uploaded through its form submissions, allowing unauthenticated attackers to upload PHP files to a web-accessible location and execute them, leading to remote code execution.
Remediation guide
Fix CVE-2026-118423 in WP Libre Form
Guide updated .
Route the non-media-library upload path through WordPress's upload validation and reject failed uploads. Apply the patch to WP Libre Form 1.5.0.1 at the exact tested commit.
Applicability
| Item | Tested scope |
|---|---|
| Source | WP Libre Form 1.5.0.1, commit 0d83f3664f19c064870374ba79135f04dcebc447. |
| Changed paths | inc/wplf-ajax.php |
| Prerequisites | Linux, Git, curl, tar, unzip, sha256sum, Node 24, and PHP 8.5 CLI with mbstring/XML. The scoped fixture uses WordPress 7.1.5; it does not need a database. |
This patch was created and tested by Casco.
Download and apply
Use a new disposable directory. These commands verify downloads before applying or executing them. Do not apply the patch blindly to another revision.
| File | SHA-256 |
|---|---|
| wp-libre-form-upload-policy.patch | 734367ca40518d28539d52912d393b0500f3a2461d5317784f98ee96db36ca09 |
| upload-test-router.php | b5c9e7b2d33772cac72ef5de16db28a0db766937ba625248c631c926a11b982b |
| run-upload-regression.cjs | 216f0c5b4782e9369ee424e894d1271cc6bdc6adbd88a90e9fdef84822c87466 |
set -eu
mkdir cve-2026-118423-verification
cd cve-2026-118423-verification
curl -fL 'https://casco.com/cve/artifacts/CVE-2026-118423/734367ca40518d28539d52912d393b0500f3a2461d5317784f98ee96db36ca09/wp-libre-form-upload-policy.patch' -o 'wp-libre-form-upload-policy.patch'
printf '%s %s\n' '734367ca40518d28539d52912d393b0500f3a2461d5317784f98ee96db36ca09' 'wp-libre-form-upload-policy.patch' | sha256sum -c -
curl -fL 'https://casco.com/cve/artifacts/CVE-2026-118423/b5c9e7b2d33772cac72ef5de16db28a0db766937ba625248c631c926a11b982b/upload-test-router.php.txt' -o 'upload-test-router.php'
printf '%s %s\n' 'b5c9e7b2d33772cac72ef5de16db28a0db766937ba625248c631c926a11b982b' 'upload-test-router.php' | sha256sum -c -
curl -fL 'https://casco.com/cve/artifacts/CVE-2026-118423/216f0c5b4782e9369ee424e894d1271cc6bdc6adbd88a90e9fdef84822c87466/run-upload-regression.cjs.txt' -o 'run-upload-regression.cjs'
printf '%s %s\n' '216f0c5b4782e9369ee424e894d1271cc6bdc6adbd88a90e9fdef84822c87466' 'run-upload-regression.cjs' | sha256sum -c -
curl -fL 'https://codeload.github.com/libreform/wp-libre-form/tar.gz/0d83f3664f19c064870374ba79135f04dcebc447' -o source.tar.gz
printf '%s %s\n' '5b7c29bb60ca950574ad328b1724c4d393cc31387aafbba00eb8afdff31dd9f6' source.tar.gz | sha256sum -c -
mkdir wp-libre-form
tar -xzf source.tar.gz -C wp-libre-form --strip-components=1
cp wp-libre-form/inc/wplf-ajax.php wplf-ajax.baseline.php
curl -fL 'https://downloads.wordpress.org/release/wordpress-7.1.5.zip' -o wordpress.zip
printf '%s %s\n' 'cd44160a3fcce179fe170331132fcfc05e84e2f9284e2aad38df2aea6edaeab1' wordpress.zip | sha256sum -c -
unzip -q wordpress.zip
git -C wp-libre-form apply --check ../wp-libre-form-upload-policy.patch
git -C wp-libre-form apply ../wp-libre-form-upload-policy.patch
php -l wp-libre-form/inc/wplf-ajax.php
node run-upload-regression.cjs "$PWD"
node -e "const r=require('./upload-test-results.json');if(r.baseline.passed!==3||r.baseline.total!==6||r.patched.passed!==6||r.patched.total!==6)process.exit(1)"
Validation
Fresh public-download verification passed patch applicability, PHP syntax and 6/6 actual-handler/WordPress-upload checks; the original passed 3/6. Benign fixtures covered allowed/disallowed file types, empty and partial uploads, optional empty fields and no-upload submissions. Database and submission-record operations were mocked in this reproducible scoped fixture.
Deployment and rollback
Test the site's allowed MIME types, optional fields, upload storage and media-library configuration in staging. The plugin creates a submission record before handling uploads; rejecting an upload can leave that record. Browser, multisite, broader compatibility and production were not tested. Keep the previous source, built package and backups. To reverse this exact patch after checking applicability:
git -C wp-libre-form apply -R ../wp-libre-form-upload-policy.patch
A rollback restores the earlier code; verify the staging result before any production rollout.
Evidence
Primary advisory or CVE record. Structured CVE record. Validation was repeated from anonymous public source/artifact downloads on November 23, 2026; The scoped results above do not establish full application or production acceptance.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Unknown WP Libre Form
Default version status: unknown
1.5.0.1 to ≤ 1.5.0.1affected