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-5538 Overview
CVE-2025-5538 is a stored Cross-Site Scripting (XSS) vulnerability in the BNS Featured Category plugin for WordPress. The flaw affects all plugin versions up to and including 2.8.2. The vulnerability resides in the bnsfc shortcode, which fails to properly sanitize user-supplied attributes and escape output. Authenticated users with contributor-level access or higher can inject arbitrary JavaScript into pages. The injected script executes in the browser of any visitor who views the affected page. The issue is categorized under CWE-79, Improper Neutralization of Input During Web Page Generation.
Critical Impact
Authenticated contributors can store malicious JavaScript in WordPress pages, enabling session hijacking, credential theft, and administrative account takeover when privileged users view the content.
Affected Products
- BNS Featured Category plugin for WordPress (all versions ≤ 2.8.2)
- WordPress sites with contributor or higher role assignments
- Any public page rendering the bnsfc shortcode
Discovery Timeline
- 2025-06-06 - CVE-2025-5538 published to the National Vulnerability Database
- 2026-06-17 - Last updated in the NVD database
Technical Details for CVE-2025-5538
Vulnerability Analysis
The vulnerability occurs in the shortcode handler for bnsfc within the BNS Featured Category plugin. Shortcode attributes passed by content authors are rendered into HTML output without sufficient sanitization or escaping. An attacker with contributor privileges can supply attribute values containing HTML or JavaScript payloads. Those payloads are stored in the database and reflected to every visitor who loads the page. Because the script executes in the context of the WordPress site origin, it can access cookies, local storage, and the DOM. When an administrator views the compromised page, the attacker can hijack the session or perform privileged actions through forged requests.
Root Cause
The plugin reads attributes from the bnsfc shortcode and emits them into HTML without invoking esc_attr(), esc_html(), or wp_kses() on the output. Input is not validated against an allowlist before storage. The combination of missing input sanitization and missing output escaping produces the stored XSS condition. The vulnerable code path can be reviewed in the WordPress plugin source.
Attack Vector
Exploitation requires network access to the WordPress site and an authenticated account at the contributor role or above. The attacker creates or edits a post containing the bnsfc shortcode with crafted attribute values. The payload persists after save. Any subsequent viewer, including administrators previewing or moderating content, triggers execution. The scope change in the CVSS vector reflects impact on users beyond the vulnerable component. Additional technical analysis is available from Wordfence.
No verified public exploit code is available. The vulnerability mechanism is standard stored XSS through unsanitized shortcode attributes rendered directly into page markup.
Detection Methods for CVE-2025-5538
Indicators of Compromise
- Posts or pages containing [bnsfc] shortcodes with attribute values that include <script>, javascript:, onerror=, or onload= strings
- Unexpected outbound requests from administrator browser sessions following content review
- New administrator accounts or privilege changes created shortly after contributor content submissions
- WordPress wp_posts table entries with HTML tags embedded inside shortcode attributes
Detection Strategies
- Query the WordPress database for posts containing the bnsfc shortcode and inspect attribute payloads for script content
- Deploy a web application firewall rule that inspects POST requests to wp-admin/post.php for script fragments inside shortcode attributes
- Enable Content Security Policy reporting to capture script-src violations originating from rendered posts
- Review audit logs for contributor accounts editing posts followed by administrator views of those posts
Monitoring Recommendations
- Monitor WordPress role assignments and flag any elevation from contributor to higher privileges
- Alert on installation of the BNS Featured Category plugin or detection of versions at or below 2.8.2 across managed sites
- Track browser error telemetry on administrator sessions for anomalous script execution within /wp-admin/
How to Mitigate CVE-2025-5538
Immediate Actions Required
- Deactivate the BNS Featured Category plugin until a patched release is confirmed available
- Audit all posts and pages for the bnsfc shortcode and remove or sanitize suspicious attribute values
- Rotate administrator session cookies and reset credentials for any account that viewed potentially malicious content
- Restrict contributor role assignments to trusted users and review recent account creations
Patch Information
As of the data available, no fixed version has been published for the BNS Featured Category plugin. All releases up to and including 2.8.2 remain vulnerable. Monitor the WordPress plugin repository and the Wordfence advisory for patch availability.
Workarounds
- Remove the plugin from production WordPress installations until a fixed version ships
- Enforce a strict Content Security Policy that disables inline scripts to blunt payload execution
- Downgrade untrusted authors from contributor to subscriber role to prevent shortcode insertion
- Deploy a web application firewall ruleset that blocks HTML and JavaScript tokens inside shortcode attributes
# Identify posts containing the vulnerable shortcode
wp post list --format=ids --s='[bnsfc' | xargs -I {} wp post get {} --field=post_content
# Deactivate the plugin via WP-CLI
wp plugin deactivate bns-featured-category
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

