Published : November 27, 2026

CVE-2026-115867: Database for Contact Form 7, WPforms, Elementor forms <= 1.5.5 Unauthenticated Arbitrary File Upload via Ninja Forms Submission PoC, Patch Analysis & Rule

Severity Critical (CVSS 9.8)
CWE 434
Vulnerable Version 1.5.5
Patched Version 1.5.6
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-115867:

Database for Contact Form 7, WPforms, Elementor forms plugin for WordPress, versions up to and including 1.5.5, is vulnerable to unauthenticated arbitrary file upload via the Ninja Forms submission handler and the copy_files function. The vulnerability carries a CVSS score of 9.8 and maps to CWE-434 (Unrestricted Upload of File with Dangerous Type). The flaw permits remote code execution under common web server configurations.

Root Cause: The plugin’s Ninja Forms submission handler in contact-form-entries/contact-form-entries.php accepts attacker-controlled file paths from the Ninja Forms file_upload field. In the vulnerable version, the handler assigns $upload_files[$field_id] = $v[‘value’] directly, with no validation that the referenced file resides inside the Ninja Forms upload directory and no restriction on the destination filename extension. The copy_files function later reads from the supplied source (which can be a stream wrapper URI such as php://filter or a path) and constructs the destination name via explode(‘/’, $file) followed by sanitize_file_name and wp_unique_filename. Because sanitize_file_name does not strip executable extensions like .php in this context, the attacker controls both the source and the final extension, enabling upload of a .php payload into the plugin’s crm_perks_uploads directory. The .htaccess block that the plugin drops in that directory does not apply on Nginx, on LiteSpeed in some configurations, or on Apache with AllowOverride None, and the plugin does not restore the file if deleted.

Exploitation: An unauthenticated attacker submits a crafted Ninja Forms submission to the public form endpoint with a file_upload field. The attacker sets the value or files entry so that the file path resolves to an attacker-controlled stream wrapper (for example php://filter/convert.base64-decode/resource=…) or to a path the plugin trusts. Because the vulnerable handler performs no realpath containment check against the ninja-forms upload directory, the attacker’s URI reaches copy_files. The destination filename is derived from the last path segment after explode, and the attacker chooses an executable extension such as .php. The file is written under wp-content/uploads/crm_perks_uploads/. A subsequent HTTP request to that path executes the payload, yielding RCE.

Patch Analysis: The patch changes three things. First, the Ninja Forms handler replaces the direct assignment with a loop over $v[‘files’]. For each entry it requires a non-empty tmp_name, calls realpath on $file[‘data’][‘file_path’], and appends the path only when strpos($f_path, ‘ninja-forms’) is not false. That realpath plus substring check confines accepted sources to the Ninja Forms upload tree and rejects stream wrapper URIs that realpath cannot resolve. Second, the destination filename computation adds Windows-aware separator handling, so backslash paths are split correctly before sanitize_file_name and wp_unique_filename, preventing bypass of the basename extraction. Third, templates/print.php now escapes and prefixes stored file values with the plugin upload URL via filter_var with FILTER_VALIDATE_URL, which blocks rendering of raw stream wrapper strings. The version is bumped to 1.5.6.

Impact: Successful exploitation yields unauthenticated arbitrary file upload and, on Nginx, on LiteSpeed in some configurations, and on Apache with AllowOverride None, remote code execution as the web server user. An attacker can deploy a web shell, pivot to the WordPress database, exfiltrate stored form submissions (which frequently contain PII), and modify site content. The CVSS 9.8 rating reflects network reachability, no authentication requirement, and full confidentiality, integrity, and availability impact.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/contact-form-entries/contact-form-entries.php
+++ b/contact-form-entries/contact-form-entries.php
@@ -2,7 +2,7 @@
 /**
 * Plugin Name: Contact Form Entries
 * Description: Save form submissions to the database from <a href="https://wordpress.org/plugins/contact-form-7/">Contact Form 7</a>, <a href="https://wordpress.org/plugins/ninja-forms/">Ninja Forms</a>, <a href="https://elementor.com/widgets/form-widget/">Elementor Forms</a> and <a href="https://wordpress.org/plugins/wpforms-lite/">WP Forms</a>.
-* Version: 1.5.5
+* Version: 1.5.6
 * Requires at least: 3.8
 * Author URI: https://www.crmperks.com
 * Plugin URI: https://www.crmperks.com/plugins/contact-form-plugins/crm-perks-forms/
@@ -25,7 +25,7 @@
   public static $type = "vxcf_form";
   public static $path = '';

-  public static  $version = '1.5.5';
+  public static  $version = '1.5.6';
   public static $upload_folder = 'crm_perks_uploads';
   public static $db_version='';
   public static $base_url='';
@@ -799,7 +799,6 @@
 if(empty($data['form_id'])){
     return;
 }
-
 $form_title=$data['settings']['title'];
 $lead=$upload_files=array();
 if(!empty($data['fields'])){
@@ -807,7 +806,18 @@
       $field_id=$v['id'];
      if(!empty($v['value'])){
          if($v['type'] == 'file_upload'){
-        $upload_files[$field_id]=$v['value'];
+             $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{
          $lead[$field_id]=$v['value'];
          }
@@ -1373,8 +1383,11 @@
                   if(strpos($file,$base_url) === 0){
                   $file=str_replace($base_url,trim(ABSPATH,'/'),$file);
                   }
-
-                $file_name_arr=explode('/',$file);
+                  $file_sep='/';
+                  if(strpos($file,'\') !== false){
+                   $file_sep='\';
+                  }
+                $file_name_arr=explode($file_sep,$file);
                $file_name=$file_name_arr[count($file_name_arr)-1];
                $file_name=sanitize_file_name($file_name);
                $file_name = wp_unique_filename( $upload_path, $file_name );
--- a/contact-form-entries/includes/plugin-pages.php
+++ b/contact-form-entries/includes/plugin-pages.php
@@ -243,7 +243,7 @@
 $fields=vxcf_form::get_form_fields($form_id);
 }

-//var_dump($leads,$fields);die();
+//var_dump($leads);die();
 include_once(vxcf_form::$path . "templates/print.php");
 exit;
 }
--- a/contact-form-entries/templates/print.php
+++ b/contact-form-entries/templates/print.php
@@ -292,6 +292,7 @@
 </div>
 <div class="vx_contents">
   <?php
+  $upload=vxcf_form::get_upload_dir();
        foreach($leads as $id=>$lead){
      $notes=$detail=array();
      if(isset($lead['lead'])){
@@ -317,6 +318,28 @@
 if(!empty($field['values'])){
  $value=vxcf_form::check_option_value($field['values'],$value);
 }
+if(isset($field['type']) && $field['type'] == 'file'){
+    $files_arr=array();
+    if(!empty($value)){
+        if(!is_array($value)){
+   if(!empty($value)){  $files_arr=array($value); }
+    }else{
+        $files_arr=$value;
+    }
+    }
+    if(!empty($files_arr)){
+    $value='';
+foreach($files_arr as $k=>$val){
+            if(filter_var($val,FILTER_VALIDATE_URL) === false){
+  $value.=esc_url($upload['url'].$val);
+    }
+}
+$field_label=$value;
+    }
+  if(is_array($field_label)){
+  $field_label=implode(', ',$field_label);
+}
+}
       }

      // $id=empty($lead_field['id']) ? $field['name'] : $lead_field['id'];

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-115867
# Blocks unauthenticated Ninja Forms submission abuse that supplies
# stream wrapper URIs or non-file paths in the file_upload field value.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026115867,phase:2,deny,status:403,chain,msg:'CVE-2026-115867 via Ninja Forms file_upload stream wrapper',severity:'CRITICAL',tag:'CVE-2026-115867'"
  SecRule ARGS_POST:action "@streq nf_ajax_submit" "chain"
    SecRule REQUEST_BODY "@rx (php|data|expect|phar|zip|compress.zlib|convert.base64|resource)://" "t:lowercase"

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.