Automated Threat Modeling

Overview of CVE-2026-115867: Unauthenticated Arbitrary File Upload via Ninja Forms in the Database for Contact Form 7, WPforms, Elementor forms Plugin

A brief summary of CVE-2026-115867, an unauthenticated arbitrary file upload in the contact-form-entries WordPress plugin through 1.5.5, with a short review of what the 1.5.6 patch changes and what it leaves untouched.

CVE Analysis

8 min read

Gaurav Sarraf
Gaurav Sarraf

2026-11-26

Overview of CVE-2026-115867: Unauthenticated Arbitrary File Upload via Ninja Forms in the Database for Contact Form 7, WPforms, Elementor forms Plugin

Introduction

A form entry storage plugin installed on tens of thousands of WordPress sites let anonymous visitors make the server copy an arbitrary source into the plugin's own uploads folder, under a filename the attacker effectively chose. Where the web server will execute PHP from that folder, that write primitive turns into remote code execution, which is why Wordfence rated CVE-2026-115867 at CVSS 3.1 9.8 Critical.

The affected plugin, Database for Contact Form 7, WPforms, Elementor forms (slug contact-form-entries), is published by CRM Perks and automatically saves submissions from form builders such as Contact Form 7, WPForms, Elementor Forms and CRM Perks Forms to the WordPress database. The WordPress plugin directory lists 60,000+ active installations, and Wordfence's product page lists 60,000. CRM Perks focuses on plugins that send WooCommerce and form data to CRMs, so this plugin commonly sits in the path of lead and customer data collected on WordPress sites.

The CVE data lists the vendor as unknown, but NVD identifies it as crmperks and the official WordPress listing names CRM Perks as the author. Despite the plugin's name, the vulnerable route identified by Wordfence is its Ninja Forms submission handler. As of November 27, 2026, the sources we reviewed report no confirmed exploitation in the wild and no CISA KEV listing.

Technical information

Root cause

The weakness is classified as CWE-434, Unrestricted Upload of File with Dangerous Type. Wordfence and NVD describe two failures in the plugin's copy_files function:

  1. It accepts an attacker-controlled stream wrapper URI as the file source.
  2. It derives the destination filename without restricting executable extensions.

The plugin hooks ninja_forms_after_submission. For every file_upload field it collects paths and passes them to copy_files(), which runs PHP's copy($file, $dest) into the plugin's uploads folder. In 1.5.5 the "path" was simply the field's submitted value:

if($v['type'] == 'file_upload'){ $upload_files[$field_id]=$v['value']; }else{

The submitter controls value. Since copy() will read from anything PHP can open, this included the stream wrapper URIs described in the advisory, not just files Ninja Forms had actually received. Inside copy_files(), the destination filename was derived by splitting the source string on / and taking the last segment:

$file_name_arr=explode('/',$file);

That filename passes only through sanitize_file_name() and wp_unique_filename(). Neither imposes an extension allow list, so the resulting file can carry an executable extension.

Attack flow

Based on the advisory and the 1.5.5 code path, exploitation proceeds as follows:

  1. An unauthenticated attacker submits a Ninja Forms form handled by the plugin, supplying a crafted value for a file_upload field that points at an attacker-chosen source, such as a stream wrapper URI.
  2. On ninja_forms_after_submission, the plugin collects that value verbatim and passes it to copy_files().
  3. copy_files() calls copy() with the attacker-controlled source and writes the result into the plugin's uploads directory, using a filename derived from the last segment of the supplied string, potentially with an executable extension.
  4. If the web server executes PHP in that directory, the written file can be interpreted as code, giving remote code execution.

The advisory does not publish an exact reproduction request or the full set of accepted wrapper variants, and we do not reproduce one here.

Upload capability versus execution capability

The vulnerable function provides the upload. Whether the file executes depends on the hosting environment. The plugin drops an .htaccess file into its uploads directory to block PHP execution, but Wordfence and NVD document that this safeguard fails in several common situations:

  • Nginx: .htaccess files are not honored, so the protection does not apply.
  • LiteSpeed in certain configurations: protection cannot be assumed for every deployment.
  • Apache with AllowOverride None: the file is present but ignored.
  • Deleted .htaccess: the plugin does not restore it, so earlier presence does not guarantee ongoing protection.

Server configuration therefore affects impact, but it does not make the upload flaw any less real.

Severity

The vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8 Critical), assigned by Wordfence as the CNA. NVD had not published a separate NIST assessment in the retrieved record. Per the FIRST CVSS specification, the Base Score reflects intrinsic severity under reasonable worst-case assumptions. It is not evidence of active exploitation.

Patch information

The fix shipped in version 1.5.6. The 1.5.6 changelog on wordpress.org states it fixed the "Arbitrary File Upload via Ninja Forms" vulnerability, and Wordfence lists 1.5.6 as the patched version, pointing to SVN changeset 3795781. Comparing contact-form-entries.php between tags/1.5.5 and tags/1.5.6 shows two code changes: the security fix itself and a supporting change.

1. Ninja Forms paths now come from upload metadata, not the submitted value

In create_entry_na, the file_upload branch now reads:

if($v['type'] == 'file_upload'){ $files=array(); if(!empty($v['files'])){ foreach($v['files'] as $file){ if(!empty($file['tmp_name'])){ $f_path=realpath($file['data']['file_path']); if(strpos($f_path,'ninja-forms') !== false){ $files[]=$f_path; } } } } $upload_files[$field_id]=$files; }else{

This puts three checks in front of copy():

  • Different source. The code ignores value and iterates over the field's files array, which Ninja Forms builds for files it actually received. Only entries with a nonempty tmp_name are used.
  • realpath(). The data.file_path value is resolved into an absolute local path, collapsing any ../ segments. realpath() returns false for anything that is not an existing local file, so wrapper URIs such as php://, data:// or http:// fail here.
  • Location check. The resolved path is kept only if it contains the string ninja-forms, tying it to Ninja Forms' upload storage.

So 1.5.6 fixes where the path comes from. It does not add file type checking.

2. Supporting change: separator detection in copy_files()

Because paths now pass through realpath(), they come back with the operating system's native separators, which are backslashes on Windows. The old explode('/',$file) would never split such a path, and the whole path would be treated as the filename. 1.5.6 detects the separator:

$file_sep='/'; if(strpos($file,'\\') !== false){ $file_sep='\\'; } $file_name_arr=explode($file_sep,$file);

This corrects filename handling and is not a security control on its own.

What the patch does not change

These notes are limited to contact-form-entries.php:

  • copy_files() still has no extension allow list or deny list. Filenames pass only through sanitize_file_name() and wp_unique_filename().
  • Every other integration (Contact Form 7, WPForms, Elementor, Forminator, Gravity Forms, Formidable and others) still feeds paths into the same function. Each is only as safe as the origin of its own paths.
  • The ninja-forms test is a substring match on the resolved path rather than a comparison against the exact Ninja Forms upload directory. Since realpath() restricts sources to existing local files, the residual risk is small, but the check is looser than a strict directory comparison.

In practice, 1.5.6 closes the Ninja Forms entry point, but copy_files() still performs no file type checking for any caller.

Remediation guidance

  • Update to 1.5.6 or a newer patched release, per Wordfence. Fixes for earlier CVEs in this plugin (for example 1.5.2 for CVE-2026-9145) do not address this issue.
  • If updating is not possible, StackFlag's guidance is to uninstall the plugin.
  • Independently, verify that the web server itself blocks script execution in the plugin's upload directory instead of relying on the bundled .htaccess file. MITRE's CWE-434 guidance (known-good extension lists, server-generated filenames, storage outside the web root) describes the general controls that the patch does not add to copy_files().

Affected systems and versions

  • Product: Database for Contact Form 7, WPforms, Elementor forms (WordPress plugin slug contact-form-entries), by CRM Perks.
  • Affected: all versions up to and including 1.5.5.
  • Fixed: 1.5.6.
  • Vulnerable route: the plugin's ninja_forms_after_submission handler, specifically its processing of file_upload fields.
  • Conditions under which code execution is possible: environments where PHP executes in the plugin's uploads directory, including Nginx, LiteSpeed in certain configurations, Apache with AllowOverride None, and any installation where the plugin's .htaccess file has been deleted.
  • Authentication required: none.

Vendor security history

This plugin has required several earlier security fixes. They are separate vulnerabilities with different access requirements and integration paths:

  • CVE-2024-1069: authenticated (administrator or higher) arbitrary file upload through view_page. Versions through 1.3.2, CVSS 7.2 High, fixed in 1.3.3.
  • CVE-2026-2599: unauthenticated PHP object injection through download_csv. Versions through 1.4.7, CVSS 9.8. The product changelog records the fix in 1.4.8.
  • CVE-2026-9145: unauthenticated arbitrary file copy through an Elementor Pro form upload field. Versions through 1.5.1, CVSS 6.5, fixed in 1.5.2. Analyzed publicly by CryptoCat.
  • CVE-2026-115867: unauthenticated arbitrary file upload through a Ninja Forms submission. Versions through 1.5.5, CVSS 9.8 Critical, fixed in 1.5.6.

The issues have moved from an administrator-only upload in 2024 to unauthenticated file copy and upload paths in 2026, all converging on file handling across different form integrations. Each issue has also received a corrective release. Because the patch for this CVE hardens only the Ninja Forms path into copy_files(), tracking each advisory and its specific fixed version is more reliable than assuming one update covers every integration.

Wordfence published its advisory on November 26, 2026 (updated November 27) and credits the researcher daroo. NVD published the record on November 27, 2026.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization