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-2302 Overview
The Advanced Woo Search plugin for WordPress contains a Stored Cross-Site Scripting (XSS) vulnerability in the aws_search_terms shortcode. The flaw affects all versions up to and including 3.28. Authenticated users with contributor-level access or above can inject arbitrary JavaScript through shortcode attributes. The injected scripts execute in the browser of any user who views the affected page. The vulnerability stems from insufficient input sanitization and output escaping on user-supplied attributes, categorized under [CWE-79].
Critical Impact
Contributor-level attackers can store malicious JavaScript that executes in administrator and visitor browsers, enabling session theft, redirection, and administrative action hijacking.
Affected Products
- Advanced Woo Search plugin for WordPress
- All versions up to and including 3.28
- WordPress sites running WooCommerce with the plugin installed
Discovery Timeline
- 2025-03-26 - CVE-2025-2302 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-2302
Vulnerability Analysis
The vulnerability resides in the plugin's shortcode handler for aws_search_terms, implemented in class-aws-shortcodes.php. The handler accepts user-controlled attributes but fails to apply adequate sanitization before rendering them in the HTML response. As a result, a contributor can embed the shortcode in a post or page and supply attribute values containing HTML or JavaScript payloads. When WordPress renders the content, the injected markup is written directly into the DOM. Any authenticated or anonymous visitor loading the page executes the attacker's script in the context of the site's origin.
Root Cause
The root cause is missing input sanitization and missing output escaping on shortcode attributes passed to the aws_search_terms handler. WordPress provides helpers such as esc_attr(), esc_html(), and sanitize_text_field() for this exact scenario, but the vulnerable code paths at lines 50 and 175 of class-aws-shortcodes.php do not consistently apply them. Reference the WordPress Plugin Code Snippet for the vulnerable code region.
Attack Vector
Exploitation requires an authenticated account with contributor privileges or higher. The attacker creates or edits a post that embeds the aws_search_terms shortcode with a malicious attribute payload. After submission, administrators or site visitors who load the page trigger the script. Because scripts run in the site's origin, the attacker can read session cookies not marked HttpOnly, perform CSRF-protected actions on behalf of the viewer, or pivot to privileged account takeover if an administrator views the page. See the Wordfence Vulnerability Report for additional detail.
Detection Methods for CVE-2025-2302
Indicators of Compromise
- Post or page content containing the [aws_search_terms] shortcode with suspicious attribute values that include HTML tags, on* event handlers, or javascript: URIs
- Database rows in wp_posts where post_content contains aws_search_terms combined with <script, onerror=, or onload=
- Unexpected outbound requests from administrator browser sessions after viewing content pages
- New or modified administrator accounts correlated with contributor activity
Detection Strategies
- Query the WordPress database for posts referencing the vulnerable shortcode and inspect their attributes for script content
- Monitor web server access logs for POST requests to /wp-admin/post.php from contributor-role accounts followed by administrator page views
- Deploy a web application firewall rule that inspects shortcode attribute values for XSS payload patterns
Monitoring Recommendations
- Alert on creation or modification of posts by contributor-role users and route them for editorial review before publishing
- Enforce a Content Security Policy (CSP) that blocks inline scripts, then monitor browser CSP violation reports
- Audit the installed plugin version across managed WordPress sites and flag any instance at 3.28 or earlier
How to Mitigate CVE-2025-2302
Immediate Actions Required
- Update the Advanced Woo Search plugin to a version later than 3.28 as soon as the vendor publishes a fixed release
- Audit existing posts and pages for the aws_search_terms shortcode and remove any instances containing untrusted attribute values
- Review contributor and author accounts for signs of compromise and rotate credentials where suspicious activity is observed
- Restrict the contributor role or require editorial review before any contributor-authored content is published
Patch Information
At the time of publication, consult the Wordfence Vulnerability Report for the latest fixed version and vendor advisory status. Apply the patched release through the WordPress plugin manager, WP-CLI, or your configuration management tooling. Verify the installed version after update to confirm the fix is in place.
Workarounds
- Deactivate the Advanced Woo Search plugin until a patched version is installed if the plugin is not critical to site operation
- Remove or disable the aws_search_terms shortcode from allowed content types if deactivation is not feasible
- Downgrade untrusted contributor accounts to subscriber role to prevent post creation during the exposure window
- Deploy a Content Security Policy that disallows inline script execution to reduce the impact of stored XSS payloads
# Configuration example: identify vulnerable plugin version using WP-CLI
wp plugin get advanced-woo-search --field=version
# Update the plugin once a patched version is available
wp plugin update advanced-woo-search
# Search post content for the vulnerable shortcode
wp db query "SELECT ID, post_title FROM wp_posts WHERE post_content LIKE '%aws_search_terms%';"
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

