CVE-2025-6212 Overview
CVE-2025-6212 is a Stored Cross-Site Scripting (XSS) vulnerability in the Ultimate Addons for Contact Form 7 WordPress plugin by Themefic. The flaw affects the Database module in versions 3.5.11 through 3.5.19. Unauthenticated attackers can inject arbitrary JavaScript through unfiltered form field names that are later rendered as JSON column headers by the admin-side DataTables renderer without HTML encoding. Script execution occurs when an administrator views the affected page in the WordPress dashboard.
Critical Impact
Unauthenticated attackers can store malicious scripts that execute in the administrator's browser session, enabling session theft, privilege escalation, and further compromise of WordPress installations.
Affected Products
- Themefic Ultimate Addons for Contact Form 7 version 3.5.11
- Themefic Ultimate Addons for Contact Form 7 versions 3.5.12 through 3.5.18
- Themefic Ultimate Addons for Contact Form 7 version 3.5.19
Discovery Timeline
- 2025-06-26 - CVE-2025-6212 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-6212
Vulnerability Analysis
The vulnerability is a stored Cross-Site Scripting flaw classified under [CWE-79]. It resides in the Database module of the Ultimate Addons for Contact Form 7 plugin. The plugin stores form field names without sanitization while sanitizing the associated values. When an administrator loads the database view, the ajax_get_table_data() endpoint returns these unfiltered names as JSON column headers. The client-side DataTables renderer in database-pro-main.js injects the headers directly into the Document Object Model (DOM) without applying HTML encoding.
Root Cause
The root cause is a combination of insufficient input sanitization on write and missing output escaping on render. Field names bypass WordPress sanitization functions when stored, and the JavaScript renderer trusts server-supplied JSON values as safe HTML. Neither the server-side PHP handler in database.php nor the client-side JavaScript performs contextual escaping before insertion into the page.
Attack Vector
An unauthenticated attacker submits a Contact Form 7 entry containing malicious JavaScript embedded in a form field name. The payload persists in the plugin's database table. When a WordPress administrator navigates to the Database module view, the AJAX handler returns the payload as a column header. The DataTables renderer inserts the script into the DOM, executing it in the administrator's authenticated session. Successful exploitation requires user interaction from a privileged user, but no attacker authentication is required.
The vulnerability manifests in the interaction between database.php and database-pro-main.js. See the Wordfence Vulnerability Report for additional technical detail.
Detection Methods for CVE-2025-6212
Indicators of Compromise
- Contact Form 7 database entries containing HTML tags such as <script>, <img onerror=>, or <svg onload=> in stored field name columns
- Unexpected outbound requests from administrator browser sessions to unknown domains after visiting the plugin's Database module page
- New or modified WordPress administrator accounts created shortly after Database module access
- Anomalous AJAX responses from ajax_get_table_data() containing JavaScript payloads in column header fields
Detection Strategies
- Inspect the plugin's database tables for stored field names containing HTML or JavaScript syntax rather than plain text identifiers
- Deploy a Web Application Firewall (WAF) rule that inspects Contact Form 7 submissions for script tags in field name parameters
- Monitor WordPress admin session activity for unexpected script execution in the wp-admin context
Monitoring Recommendations
- Enable WordPress audit logging to record plugin database reads and administrator page visits
- Aggregate WordPress access logs and browser Content Security Policy (CSP) violation reports in a centralized SIEM for correlation
- Alert on plugin version enumeration attempts and repeated submissions to Contact Form 7 endpoints from single IP addresses
How to Mitigate CVE-2025-6212
Immediate Actions Required
- Update Ultimate Addons for Contact Form 7 to a version later than 3.5.19 that includes the fix from WordPress Changeset 3316177
- Audit existing plugin database entries and purge any records containing HTML or JavaScript in field name columns
- Force password resets and session invalidation for all WordPress administrator accounts that accessed the Database module during the exposure window
- Review WordPress user tables for unauthorized administrator accounts and remove any that were not provisioned by legitimate administrators
Patch Information
The vendor addressed the vulnerability in the plugin repository. Details of the code change are available in the WordPress Plugin Changeset. Site owners should apply the update through the WordPress admin update mechanism or by manually replacing the plugin files from the WordPress Plugin Developer Page.
Workarounds
- Deactivate the Ultimate Addons for Contact Form 7 plugin until the patched version can be installed
- Restrict access to the wp-admin Database module page through server-level access control lists or IP allowlisting
- Deploy a Content Security Policy (CSP) header that blocks inline script execution on WordPress admin pages
- Configure a WAF rule to strip HTML tags from Contact Form 7 field name parameters at the network perimeter
# Configuration example: WordPress CLI update command
wp plugin update ultimate-addons-for-contact-form-7 --version=latest
wp plugin get ultimate-addons-for-contact-form-7 --field=version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

