Skip to main content
Vulnerability Database/CVE-2026-97336

CVE-2026-97336: WordPress CMB2 Plugin XSS Vulnerability

CVE-2026-97336 is a stored XSS flaw in WordPress CMB2 plugin affecting file_list fields that lets attackers inject malicious scripts. This article covers technical details, affected versions, impact, and mitigation.

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-2026-97336 Overview

CVE-2026-97336 is a stored Cross-Site Scripting (XSS) vulnerability in the CMB2 plugin for WordPress, affecting all versions up to and including 2.13.0. The flaw resides in the file_list field type and stems from insufficient input sanitization and output escaping [CWE-79]. Unauthenticated attackers can inject arbitrary web scripts that execute when users access affected pages. CMB2 is a developer library, so exploitation requires an integrating plugin or theme to register a file_list field on a publicly accessible front-end form or a user meta box.

Critical Impact

Unauthenticated attackers can inject persistent JavaScript payloads that execute in the browser of any visitor loading an affected page, enabling session theft, admin account takeover, and site defacement.

Affected Products

  • CMB2 plugin for WordPress, all versions through 2.13.0
  • WordPress sites running themes or plugins that register file_list fields on public front-end forms
  • WordPress sites exposing file_list fields via user meta boxes

Discovery Timeline

  • 2026-10-02 - CVE CVE-2026-97336 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-97336

Vulnerability Analysis

The CMB2 (Custom Metaboxes and Fields 2) library provides WordPress developers with reusable field types for metaboxes, user profiles, term meta, and front-end forms. The file_list field type accepts multiple file attachments and persists them as post meta. The vulnerability allows attacker-controlled values to flow into HTML output without proper escaping, resulting in stored XSS.

Because CMB2 is a library rather than a standalone end-user plugin, exposure depends on how downstream integrators use it. When a theme or plugin wires a file_list field into a publicly reachable front-end form, or into a user meta box editable without authentication, unauthenticated input reaches the vulnerable sink.

The stored nature of the flaw means a single injection persists in the database and triggers for every subsequent viewer of the affected page.

Root Cause

The root cause is missing input sanitization during save and inadequate output escaping during rendering of file_list field values. The affected code paths include CMB2_Field.php, CMB2_Sanitize.php, CMB2_Utils.php, and CMB2_Type_File_List.php. Attacker-supplied metadata associated with uploaded files is reflected into HTML attributes without being passed through WordPress escaping functions such as esc_attr() or esc_html().

Attack Vector

The attack is executed over the network with no authentication or user interaction required against vulnerable configurations. An attacker submits a crafted payload through a publicly exposed file_list field, the data is persisted, and the injected script fires when any user, including administrators, renders the affected page. The scope change in the CVSS vector reflects that script execution occurs in the browser context of a victim distinct from the attacker.

No verified exploit code is publicly available at the time of writing. See the Wordfence vulnerability record and the CMB2 changeset 3712103 for the patch details.

Detection Methods for CVE-2026-97336

Indicators of Compromise

  • Unexpected <script>, onerror, or onload strings stored in wp_postmeta or wp_usermeta rows associated with CMB2 file_list fields
  • Outbound browser requests to unknown domains originating from pages that render CMB2 fields
  • New or modified administrator accounts following visits to pages containing CMB2 file_list content

Detection Strategies

  • Query the WordPress database for metadata values matching HTML or JavaScript patterns in keys associated with CMB2 file_list fields
  • Inspect site logs for anonymous POST requests to front-end endpoints that process file uploads via CMB2
  • Scan rendered HTML of public pages for inline scripts or event handler attributes that did not exist in prior snapshots

Monitoring Recommendations

  • Enable a Web Application Firewall (WAF) with rules that identify common XSS payload patterns in multipart form submissions
  • Monitor WordPress file integrity for unexpected changes to CMB2 plugin files and theme files that register file_list fields
  • Alert on admin session activity originating from unusual IP addresses shortly after public page views

How to Mitigate CVE-2026-97336

Immediate Actions Required

  • Update CMB2 to the version released in changeset 3712103, which supersedes 2.13.0
  • Audit all themes and plugins that depend on CMB2 to identify any publicly accessible file_list field registrations
  • Review wp_postmeta and wp_usermeta tables for suspicious stored values and remove injected payloads

Patch Information

The CMB2 maintainers addressed the vulnerability in the commit referenced by CMB2 changeset 3712103. The fix adds proper sanitization and output escaping to file_list field handling. Review the vulnerable sinks in CMB2_Field.php line 617 and CMB2_Type_File_List.php line 51 to confirm patched behavior in your environment.

Workarounds

  • Remove or disable public-facing forms that register CMB2 file_list fields until patching is complete
  • Restrict file_list field registrations to authenticated admin contexts only
  • Deploy WAF rules that block script tags and inline event handler attributes in request bodies targeting CMB2 endpoints
bash
# Update CMB2 using WP-CLI once a fixed release is available
wp plugin update cmb2
wp plugin get cmb2 --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.