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-4671 Overview
CVE-2025-4671 is a Stored Cross-Site Scripting (XSS) vulnerability in the Profile Builder plugin for WordPress. The flaw affects all versions up to and including 3.13.8. It resides in the plugin's user_meta and compare shortcodes, which fail to properly sanitize input and escape output on user-supplied attributes. Authenticated attackers with contributor-level access or higher can inject arbitrary web scripts into pages. These scripts execute in the browser of any user who views the affected page. The issue is tracked under CWE-79 and was reported through the Wordfence vulnerability intelligence program.
Critical Impact
Authenticated contributors can inject persistent JavaScript that executes against site visitors and administrators, enabling session theft, forced actions, and site takeover chains.
Affected Products
- WordPress Profile Builder plugin — all versions through 3.13.8
- Profile Builder compare shortcode handler (admin/advanced-settings/includes/shortcodes/compare.php)
- Profile Builder user_meta shortcode handler (admin/advanced-settings/includes/shortcodes/usermeta.php)
Discovery Timeline
- 2025-06-03 - CVE-2025-4671 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-4671
Vulnerability Analysis
The Profile Builder plugin exposes two shortcodes, [wppb-user-meta] and [wppb-compare], that render user-controlled attribute values back into page HTML. In vulnerable builds, these handlers do not pass attribute input through WordPress sanitization helpers such as sanitize_text_field() or escape output with esc_attr() or esc_html() before echoing. A user with contributor privileges can embed either shortcode in post content and supply crafted attribute values that break out of the surrounding HTML context. The payload is persisted in the post record and served to every subsequent viewer. Because the script runs in the authenticated session of the viewer, an administrator visiting the content triggers execution with administrator cookies and nonces available in the Document Object Model (DOM).
Root Cause
The root cause is insufficient input sanitization and missing output escaping on shortcode attributes handled in compare.php and usermeta.php. The plugin trusts attribute values authored by contributors and renders them directly in attribute or text contexts. WordPress treats contributor accounts as low-privilege authors, so the capability check implied by the shortcode is not sufficient to prevent abuse.
Attack Vector
An attacker authenticates as a contributor, creates or edits a post, and inserts the user_meta or compare shortcode with a malicious attribute payload. The post is saved as pending review or published, depending on the site workflow. When any user — including an editor or administrator previewing the submission — loads the rendered page, the injected script runs under the site origin. Typical outcomes include administrative action forgery through nonce reuse, creation of rogue administrator accounts, redirection, and credential harvesting. The scope change in the scoring reflects that script execution crosses from the vulnerable component into the user's authenticated browser context.
No verified public proof-of-concept code is published. See the Wordfence vulnerability report and the upstream patch changeset #3304692 for the technical fix diff.
Detection Methods for CVE-2025-4671
Indicators of Compromise
- Post or page content containing [wppb-user-meta] or [wppb-compare] shortcodes with attribute values containing <script, onerror=, onload=, javascript:, or encoded variants.
- Unexpected WordPress administrator accounts, modified wp_options entries, or new plugin installations following contributor activity.
- Outbound requests from browsers of logged-in administrators to unknown domains immediately after viewing Profile Builder-rendered content.
Detection Strategies
- Audit the wp_posts table for shortcode usage: SELECT ID, post_author, post_status FROM wp_posts WHERE post_content REGEXP 'wppb-(user-meta|compare)'; then review the attribute values of each match.
- Deploy a web application firewall rule that inspects POST bodies to /wp-admin/post.php and /wp-admin/admin-ajax.php for Profile Builder shortcodes containing HTML event handlers or <script> tags.
- Monitor contributor and author accounts for anomalous post creation volume or edits targeting pages previously rendered by Profile Builder.
Monitoring Recommendations
- Enable WordPress audit logging on user role changes, plugin installs, and wp_users modifications; alert on changes that follow a contributor publishing event.
- Capture browser Content Security Policy (CSP) violation reports to surface unexpected inline script execution on pages that embed Profile Builder shortcodes.
- Track plugin version drift across managed WordPress sites and alert when Profile Builder remains at 3.13.8 or earlier.
How to Mitigate CVE-2025-4671
Immediate Actions Required
- Update the Profile Builder plugin to the version released in changeset #3304692 (the first release after 3.13.8) on every WordPress site.
- Review all posts and pages for the [wppb-user-meta] and [wppb-compare] shortcodes and remove any attribute values that contain HTML or script content.
- Rotate administrator passwords and invalidate active sessions if contributor-authored content was published or previewed before patching.
Patch Information
The vendor fix is published in WordPress plugin changeset #3304692 and distributed through the Profile Builder plugin page. The patch adds sanitization and escaping on shortcode attributes handled in compare.php and usermeta.php. Review the vulnerable handlers at compare.php L5 and usermeta.php L5.
Workarounds
- Restrict the contributor role until the plugin is patched by removing the edit_posts capability or routing contributor submissions through a mandatory editorial review that strips shortcodes.
- Disable the Profile Builder advanced shortcodes module from the plugin settings if the user_meta and compare shortcodes are not required.
- Deploy a Content Security Policy that forbids inline scripts (script-src 'self') on front-end pages to reduce the impact of injected payloads.
# Identify posts containing the vulnerable shortcodes
wp post list --field=ID --post_status=any \
| xargs -I {} wp post get {} --field=post_content \
| grep -E 'wppb-(user-meta|compare)'
# Force-update the Profile Builder plugin on all managed sites
wp plugin update profile-builder --version=latest
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

