Skip to main content

CVE-2025-5684: MetForm WordPress Plugin XSS Vulnerability

CVE-2025-5684 is a stored XSS vulnerability in the MetForm WordPress plugin affecting versions up to 4.0.1. Authenticated attackers with Contributor access can inject malicious scripts. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

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

CVE-2025-5684 is a Stored Cross-Site Scripting (XSS) vulnerability in the MetForm plugin for WordPress, a contact form, survey, quiz, and custom form builder for Elementor. The flaw exists in the mf-template DOM element and affects all plugin versions up to and including 4.0.1. Insufficient input sanitization and output escaping allow authenticated attackers with Contributor-level access or higher to inject arbitrary JavaScript into pages. The injected scripts execute in the browser of any user who views an affected page. The vulnerability is categorized under [CWE-79] Improper Neutralization of Input During Web Page Generation.

Critical Impact

Authenticated contributors can store malicious scripts that execute in visitors' and administrators' browsers, enabling session theft, privilege escalation, and site defacement.

Affected Products

  • MetForm – Contact Form, Survey, Quiz, & Custom Form Builder for Elementor (WordPress plugin)
  • All versions up to and including 4.0.1
  • WordPress sites allowing Contributor-level or higher user registration

Discovery Timeline

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

Technical Details for CVE-2025-5684

Vulnerability Analysis

The vulnerability resides in how the MetForm plugin processes attributes bound to its mf-template DOM element. User-controlled values passed into this element are not sufficiently sanitized on input, and the resulting output is not properly escaped when rendered on the frontend. As a result, attacker-supplied markup and JavaScript are stored in post or form content and later executed in the browser of any visitor to the affected page.

Stored XSS of this kind permits attackers to hijack authenticated sessions, perform actions on behalf of logged-in users, inject SEO spam, redirect traffic, or deliver secondary payloads such as cryptominers and credential-harvesting forms. When an administrator views an infected page, the attacker can leverage administrative privileges to create new users, install plugins, or modify site content.

Root Cause

The root cause is missing or inadequate sanitization of the mf-template element attributes within the plugin's frontend JavaScript bundle (public/assets/js/app.js) and corresponding server-side rendering logic. The plugin trusts input supplied by authenticated contributors without applying WordPress escaping functions such as wp_kses_post() or esc_attr() on output.

Attack Vector

An attacker first obtains a Contributor account on the target WordPress site, either through open registration or compromised credentials. The attacker then creates a post or form containing a MetForm element whose mf-template attribute includes a malicious script payload. When another user, typically an editor or administrator reviewing the submission, loads the page, the stored payload executes in their browser session.

The vulnerability requires low privileges and no user interaction beyond normal page browsing. Because the scope changes between the attacker and the victim, the impact extends beyond the attacker's own account to other site users. Technical details on the affected plugin bundle are available in the MetForm JS File and the Wordfence advisory.

Detection Methods for CVE-2025-5684

Indicators of Compromise

  • Post or form content containing mf-template attributes with inline <script> tags, javascript: URIs, or event handlers such as onerror= and onload=.
  • Unexpected outbound requests from visitor browsers to attacker-controlled domains originating from pages that embed MetForm elements.
  • Creation of new administrator accounts or plugin installations shortly after a contributor submits new content.

Detection Strategies

  • Audit the wp_posts table for MetForm shortcodes and widget data containing suspicious HTML entities, base64 payloads, or script tags.
  • Monitor WordPress audit logs for post creations and edits performed by Contributor-level accounts followed by administrative views of those posts.
  • Deploy a Web Application Firewall rule to flag HTTP POST requests to wp-admin/post.php containing mf-template parameters with script content.

Monitoring Recommendations

  • Enable browser Content Security Policy (CSP) reporting to capture violations from pages hosting MetForm elements.
  • Alert on new user registrations assigned the Contributor role when open registration is enabled.
  • Review Elementor-rendered pages that invoke MetForm widgets for unexpected DOM mutations or script sources.

How to Mitigate CVE-2025-5684

Immediate Actions Required

  • Update the MetForm plugin to a version later than 4.0.1 as soon as a patched release is available from the vendor.
  • Audit all Contributor, Author, and Editor accounts and remove or suspend any that are unused or unrecognized.
  • Scan existing posts, pages, and form templates for malicious markup injected through the mf-template element.

Patch Information

The vulnerability affects MetForm versions up to and including 4.0.1. Site administrators should apply the vendor-supplied security update as soon as it becomes available through the WordPress plugin repository. Review the Wordfence advisory for the current patched version.

Workarounds

  • Temporarily disable the MetForm plugin on sites where untrusted contributors have accounts until a patched version is installed.
  • Restrict contributor registration and require administrator approval for all new accounts.
  • Deploy a Content Security Policy that disallows inline scripts and restricts script sources to trusted origins to reduce the impact of stored XSS payloads.
bash
# Example WordPress CLI check for MetForm version and vulnerable content
wp plugin get metform --field=version
wp db query "SELECT ID, post_title FROM wp_posts WHERE post_content LIKE '%mf-template%' AND post_content LIKE '%<script%';"

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.