CVE-2024-48048
Executive Summary
CVE-2024-48048 is a Cross-Site Request Forgery (CSRF) vulnerability in the WordPress plugin Wsify Widget (version <= 1.0) developed by Gabbykhrmon. This flaw allows an attacker to trick an authenticated administrator into performing unintended actions, such as modifying plugin settings or injecting malicious scripts. The CSRF vector enables Stored Cross-Site Scripting (XSS), meaning an attacker can inject persistent JavaScript payloads that execute in the context of any user viewing the affected widget. The vulnerability is unpatched, and no official fix is available from the vendor. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains significant for sites using this plugin.
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 affects a WordPress plugin distributed via the official WordPress plugin repository. Since the plugin is unmaintained and no patch exists, users should consider it a supply chain risk. The plugin may be bundled in themes or third-party packages, increasing the attack surface. No known malicious packages have been identified, but the lack of updates makes it a prime target for supply chain compromise.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must click a crafted link
- Scope: Changed (S:C) – CSRF leads to XSS, affecting other users
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: High. Although the EPSS score is low, the combination of CSRF and Stored XSS allows an attacker to perform persistent attacks with minimal user interaction. The lack of a patch increases the risk for unmaintained sites.
Deep Dive & Mechanics
The vulnerability resides in the wsify-widget WordPress plugin, which provides a widget for displaying content. The plugin fails to implement CSRF tokens on administrative actions, such as saving widget settings. An attacker can craft a malicious HTML page that, when visited by an authenticated admin, submits a forged request to the WordPress admin panel. This request can modify the widget’s content to include arbitrary JavaScript.
Because the widget content is stored in the database without proper sanitization, the injected script executes for any user viewing the widget (Stored XSS). The attack chain is:
- Attacker crafts a CSRF payload that targets the widget settings endpoint.
- Victim (admin) visits the attacker’s page while logged into WordPress.
- The forged request updates the widget with malicious JavaScript.
- Any visitor to the site triggers the XSS payload, leading to session hijacking, defacement, or data theft.
The vulnerability is classified under CWE-352 (Cross-Site Request Forgery) and CWE-79 (Improper Neutralization of Input During Web Page Generation – Stored XSS).
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the only reference. The plugin likely uses wp_verify_nonce() incorrectly or not at all. A patched version would include:
- CSRF Protection: Add a nonce field to all admin forms and verify it with
check_admin_referer(). - Output Escaping: Use
esc_html()orwp_kses_post()when rendering widget content.
Vulnerable Code (hypothetical):
// In admin settings page
function wsify_save_settings() {
update_option('wsify_widget_content', $_POST['widget_content']);
}
Patched Code (hypothetical):
function wsify_save_settings() {
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'wsify_save_settings')) {
wp_die('Security check failed');
}
$content = wp_kses_post($_POST['widget_content']);
update_option('wsify_widget_content', $content);
}
Exploitation & Lab Setup
Red Team (Attacker)
Lab Setup:
- Target: WordPress site with Wsify Widget <= 1.0 installed and an admin user.
- Attacker: Kali Linux with a web server to host the CSRF page.
Exploit Steps:
- Identify the admin endpoint for saving widget settings (e.g.,
/wp-admin/options-general.php?page=wsify-widget). - Craft a CSRF HTML page that auto-submits a form with malicious JavaScript:
<html>
<body>
<form action="http://target/wp-admin/admin-post.php" method="POST" id="csrf">
<input type="hidden" name="action" value="wsify_save_settings">
<input type="hidden" name="widget_content" value="<script>alert('XSS')</script>">
</form>
<script>document.getElementById('csrf').submit();</script>
</body>
</html>
- Host the page and send the link to the victim admin (e.g., via email or social engineering).
- Once the admin visits the page, the widget content is updated with the XSS payload.
- Any user viewing the widget triggers the script.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Defender)
Detection & Response:
- Monitor for unusual POST requests to
/wp-admin/admin-post.phpwithaction=wsify_save_settings. - Look for unexpected changes to the
wsify_widget_contentoption in the database. - Use Web Application Firewall (WAF) rules to block requests containing
<script>tags in widget parameters. - Educate admins to avoid clicking suspicious links while logged into WordPress.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-admin/admin-post.phpwithaction=wsify_save_settingsandwidget_contentcontaining JavaScript. - Referer header from an external domain (CSRF attack).
- POST requests to
- Host IOCs:
- Database entry in
wp_optionswhereoption_name = 'wsify_widget_content'contains<script>tags. - Unexpected JavaScript in the widget output on the frontend.
- Database entry in
- File IOCs:
- Modified plugin files (though unlikely, check
/wp-content/plugins/wsify-widget/for unauthorized changes).
- Modified plugin files (though unlikely, check
Detection Engineering
YARA Rule
rule CVE_2024_48048_CSRF_XSS {
meta:
description = "Detects CSRF-based Stored XSS in Wsify Widget plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-48048"
strings:
$csrf_action = "wsify_save_settings"
$xss_payload = /<script[^>]*>.*<\/script>/i
condition:
$csrf_action and $xss_payload
}
Sigma Rule
title: CVE-2024-48048 - CSRF to Stored XSS in Wsify Widget
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects CSRF attempts targeting Wsify Widget settings
logsource:
category: web
product: wordpress
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-post.php'
cs-form-data|contains: 'action=wsify_save_settings'
cs-form-data|contains: 'widget_content='
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-48048 - CSRF to Stored XSS in Wsify Widget"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-post.php"; http_uri; content:"action=wsify_save_settings"; http_client_body; content:"widget_content="; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not essential. Remove it from all WordPress installations.
- Apply a virtual patch using a WAF to block requests to
admin-post.phpwithaction=wsify_save_settingsand suspiciouswidget_contentvalues. - Restrict admin access to trusted IPs only.
Long-Term Fix:
- Since no patch exists, consider forking the plugin and adding CSRF nonces and output escaping, or migrate to an alternative widget plugin.
- Monitor the WordPress plugin repository for updates.
Detection:
- Implement the Sigma and Suricata rules above.
- Regularly audit WordPress plugins for known vulnerabilities.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.