Skip to main content

CVE-2025-5843: Brandfolder WordPress Plugin XSS Vulnerability

CVE-2025-5843 is a stored cross-site scripting flaw in the Brandfolder WordPress plugin affecting versions up to 5.0.19. Attackers with Contributor-level access can inject malicious scripts via the id parameter. This article covers technical details, affected versions, impact, and mitigation steps.

Published:

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-5843 Overview

CVE-2025-5843 is a Stored Cross-Site Scripting (XSS) vulnerability [CWE-79] in the Brandfolder plugin for WordPress. The flaw affects all versions up to and including 5.0.19. The vulnerability stems from insufficient input sanitization and output escaping on the id parameter within brandfolder-integration.php. Authenticated users with Contributor-level access or higher can inject arbitrary web scripts into pages. The injected scripts execute in the browser of any user who visits the affected page, enabling session theft, account takeover, and content manipulation within the WordPress site.

Critical Impact

Contributor-level attackers can persist malicious JavaScript that executes against site visitors and administrators, enabling session hijacking and privilege escalation on the WordPress instance.

Affected Products

  • Brandfolder plugin for WordPress, all versions up to and including 5.0.19
  • WordPress sites allowing Contributor-level (or higher) account registration
  • WordPress installations using the Brandfolder integration for media asset embedding

Discovery Timeline

  • 2025-07-16 - CVE-2025-5843 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-5843

Vulnerability Analysis

The Brandfolder plugin exposes an id parameter that is rendered back into the page without sufficient sanitization or output encoding. An authenticated attacker at the Contributor role or above can supply a payload containing HTML or JavaScript through this parameter. The plugin stores the value and later emits it into rendered page markup, resulting in stored XSS. Because the injection is persistent, the payload fires whenever any user, including administrators, loads the affected page.

Stored XSS in a WordPress context is particularly useful to attackers because administrator sessions grant control over themes, plugins, and user accounts. An attacker can chain the injection to install a malicious plugin, create a new administrator user, or exfiltrate authentication cookies to an attacker-controlled server.

Root Cause

The vulnerability originates in the plugin file brandfolder-integration.php around line 138. The code path handling the id parameter fails to apply WordPress escaping functions such as esc_attr() or esc_html() before echoing the value into the DOM. Missing input validation compounds the issue by allowing arbitrary characters, including angle brackets and quotes, to flow directly from user input to page output.

Attack Vector

Exploitation requires an authenticated session with at least Contributor privileges but no user interaction from the victim beyond visiting the injected page. The attacker submits a crafted id value containing a script payload through the plugin's interface. The payload is persisted and later reflected into pages served to other users, where it executes under the origin of the vulnerable WordPress site. See the Wordfence Vulnerability Analysis and the WordPress Plugin Code Review v5.0.19 for the affected code path.

No verified exploit code is published for this CVE. The vulnerability mechanism is described in prose based on the referenced advisories.

Detection Methods for CVE-2025-5843

Indicators of Compromise

  • Unexpected <script> tags, event handlers (for example onerror=, onload=), or javascript: URIs stored in WordPress post content or plugin metadata
  • Outbound HTTP requests from administrator browsers to unfamiliar domains shortly after loading pages that embed Brandfolder assets
  • New administrator accounts or plugin installations that follow browsing activity on pages containing the id parameter
  • Web server access logs showing POST requests from Contributor accounts containing HTML-encoded script payloads in the id parameter

Detection Strategies

  • Audit the WordPress wp_posts and plugin option tables for stored values containing <script, onerror=, onload=, or javascript: strings
  • Enable a Content Security Policy (CSP) with reporting to surface script executions from unexpected sources on pages using the Brandfolder plugin
  • Review Brandfolder plugin usage across all posts and pages, focusing on content authored or edited by Contributor-level accounts
  • Correlate web application firewall (WAF) alerts for XSS patterns with authenticated sessions belonging to lower-privilege roles

Monitoring Recommendations

  • Monitor for privilege changes, new user creation, and plugin installation events in WordPress audit logs after administrator visits to Brandfolder pages
  • Alert on Contributor or Author accounts submitting parameter values containing HTML tag characters
  • Track outbound connections from browsers of WordPress administrators to identify credential exfiltration attempts

How to Mitigate CVE-2025-5843

Immediate Actions Required

  • Update the Brandfolder plugin to version 5.0.20 or later on all WordPress installations
  • Review Contributor, Author, and Editor accounts and remove any that are inactive or unnecessary
  • Rotate credentials and invalidate active sessions for administrator accounts that may have viewed compromised pages
  • Scan post content and plugin options for stored script payloads and remove any malicious entries

Patch Information

The vendor addressed the issue in Brandfolder version 5.0.20. The fix is visible in the code diff between the v5.0.19 and v5.0.20 tags in the WordPress plugin repository. Additional details are available on the WordPress Brandfolder Developer Page.

Workarounds

  • Deactivate the Brandfolder plugin until the update to 5.0.20 can be applied
  • Restrict registration and reduce the number of accounts with Contributor role or higher
  • Deploy a web application firewall rule that blocks HTML and script metacharacters in the id parameter of Brandfolder endpoints
  • Enforce a strict Content Security Policy that disallows inline scripts on WordPress pages
bash
# Update the Brandfolder plugin using WP-CLI
wp plugin update brandfolder --version=5.0.20

# Verify the installed version
wp plugin get brandfolder --field=version

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.