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.







