Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-5291 Overview
CVE-2025-5291 is a Stored Cross-Site Scripting (XSS) vulnerability [CWE-79] affecting the Averta Master Slider – Responsive Touch Slider plugin for WordPress. The flaw exists in the masterslider_pb and ms_slide shortcodes in all versions up to and including 3.10.8. The plugin fails to properly sanitize user-supplied attributes and escape output. Authenticated attackers with contributor-level access or higher can inject arbitrary JavaScript into pages. The injected script executes in the browser of any user who views the affected page.
Critical Impact
Authenticated contributors can inject persistent JavaScript into WordPress pages, enabling session theft, administrative action hijacking, and site defacement when victims render the content.
Affected Products
- Averta Master Slider – Responsive Touch Slider plugin for WordPress
- All versions up to and including 3.10.8
- WordPress sites allowing contributor-level or higher registration
Discovery Timeline
- 2025-06-17 - CVE-2025-5291 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-5291
Vulnerability Analysis
The vulnerability resides in the shortcode handlers defined in includes/msp-shortcodes.php of the Master Slider plugin. The masterslider_pb and ms_slide shortcodes accept user-supplied attributes that are rendered back into the page markup without adequate sanitization or escaping. Because WordPress shortcodes are executed server-side during post rendering, any malicious attribute values are stored in the post content and executed each time a visitor loads the page. This produces a persistent XSS condition that survives across sessions and users.
Root Cause
The plugin processes shortcode attributes at multiple locations in msp-shortcodes.php (lines 28, 633, 763, and 783 in the vulnerable 3.10.8 release) and injects those attributes into HTML output. The code paths lack calls to WordPress escaping helpers such as esc_attr(), esc_html(), or wp_kses_post(). This omission allows attribute values to carry HTML and JavaScript constructs directly into the rendered DOM.
Attack Vector
Exploitation requires an authenticated account with contributor privileges or higher. The attacker inserts a crafted masterslider_pb or ms_slide shortcode containing malicious attribute values into a post or page they can edit. When an editor, administrator, or site visitor accesses the page, the injected script runs within their browser session under the site's origin. Because the attack scope is marked as Changed, the injected payload can affect users beyond the attacker's own security context. A public proof-of-concept is available at the PoC repository on GitHub.
The vulnerability manifests when shortcode attribute parsing concatenates untrusted values into HTML without escaping. See the vulnerable code paths in the Master Slider shortcode source and the Wordfence vulnerability analysis for technical details.
Detection Methods for CVE-2025-5291
Indicators of Compromise
- Posts or pages containing [masterslider_pb] or [ms_slide] shortcodes with attribute values that include <script>, onerror=, onload=, or javascript: sequences
- Unexpected outbound requests from administrator browser sessions to attacker-controlled domains after viewing contributor-authored content
- Creation of new administrator accounts or modified user roles shortly after low-privilege users submit content for review
Detection Strategies
- Query the wp_posts table for shortcode usage with suspicious attribute content, for example attributes containing angle brackets, event handlers, or protocol prefixes
- Review WordPress audit logs for contributor-level accounts publishing or submitting posts that embed Master Slider shortcodes
- Monitor web server logs for POST requests to /wp-admin/post.php and /wp-admin/admin-ajax.php originating from low-privilege sessions that include shortcode payloads
Monitoring Recommendations
- Enable Content Security Policy (CSP) reporting to capture inline script violations rendered by injected shortcodes
- Alert on administrator session activity that follows the rendering of pages authored by contributor accounts
- Track installed plugin versions across the WordPress estate and flag any Master Slider installations at or below 3.10.8
How to Mitigate CVE-2025-5291
Immediate Actions Required
- Update the Master Slider plugin to the version released in WordPress change set #3309620, which addresses the shortcode sanitization gap
- Audit existing posts and pages for masterslider_pb and ms_slide shortcodes with suspicious attribute content and remove or sanitize offending entries
- Review the contributor and author user base and remove accounts that are not actively required
Patch Information
The vendor addressed the vulnerability in the WordPress plugin repository via change set #3309620. The fix introduces proper sanitization and escaping of shortcode attributes in msp-shortcodes.php. Site operators should upgrade to the latest Master Slider release available on the plugin page.
Workarounds
- Deactivate the Master Slider plugin until the patched version is deployed
- Restrict the contributor role from using shortcodes by applying a capability filter or a security plugin that strips unapproved shortcodes from low-privilege submissions
- Enforce a strict Content Security Policy that disallows inline scripts to limit the impact of injected payloads
# Update Master Slider via WP-CLI once the patched version is available
wp plugin update master-slider --version=latest
# Temporary mitigation: deactivate the plugin until patched
wp plugin deactivate master-slider
# Audit posts for suspicious shortcode usage
wp db query "SELECT ID, post_title FROM wp_posts WHERE post_content REGEXP '\\[(masterslider_pb|ms_slide)[^]]*(<script|onerror=|onload=|javascript:)';"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

