CVE-2026-120746 in MW WP Form Plugininfo

Summary

by MITRE • 11/26/2026

The MW WP Form plugin for WordPress is vulnerable to Insecure Direct Object Reference in all versions up to, and including, 5.1.8 via the 'mw-wp-form_session_mw-wp-form-<FORM_ID>' parameter due to missing validation on a user controlled key. This makes it possible for unauthenticated attackers to overwrite or delete arbitrary WordPress transients in wp_options — including core-managed transients such as wp_styles_for_blocks — enabling injection of attacker-controlled CSS into every front-end page and permanent anchoring of poisoned transient values that never re-expire. The plugin's CSRF check does not prevent exploitation because MW_WP_Form_Data::__construct() registers _save_to_session() on the PHP shutdown hook before the CSRF check runs, causing the transient write to fire even after wp_safe_redirect()+exit; the GET path via the [mwform_formkey] shortcode has no CSRF check at all.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/26/2026

The vulnerability identified in MW WP Form versions up to 5.1.8 represents a critical failure in input validation and session management within the WordPress ecosystem, specifically classified as an Insecure Direct Object Reference (IDOR) with severe implications for data integrity and confidentiality. The core technical flaw resides in how the plugin handles the mw-wp-form_session_mw-wp-form-<FORM_ID> parameter. Instead of validating that the user-provided key corresponds to a legitimate session owned by the current authenticated context or adhering to expected format constraints, the application accepts arbitrary keys without sufficient verification. This lack of validation allows an unauthenticated attacker to manipulate internal state variables directly, bypassing standard access controls that would normally restrict such operations to authorized users only.

The operational impact of this vulnerability extends far beyond simple session hijacking due to the specific mechanism by which data is persisted. The plugin utilizes WordPress transients stored in the wp_options database table to manage form sessions and other temporary data. Because the attacker can control the key used for these write operations, they are able to overwrite or delete arbitrary transient values within this table. This capability is particularly dangerous because it includes core-managed transients such as wp_styles_for_blocks, which WordPress uses to cache CSS styles required for block editor functionality across front-end pages. By poisoning these specific entries, the attacker can inject malicious Cascading Style Sheets into every page served by the website, leading to widespread cross-site scripting or visual defacement that affects all visitors regardless of their authentication status.

A critical aspect of this vulnerability's exploitability is the failure of standard security mitigations implemented within the plugin architecture. Typically, WordPress plugins employ Cross-Site Request Forgery (CSRF) tokens to prevent unauthorized state-changing requests from being executed on behalf of authenticated users without their consent. However, in MW WP Form versions affected by this flaw, the CSRF validation logic is rendered ineffective due to a race condition and improper hook registration order within the PHP lifecycle. Specifically, the method mw_wp_form_data::__construct() registers the _save_to_session function on the PHP shutdown hook before the CSRF check is executed. Consequently, even if the script attempts to abort execution via wp_safe_redirect followed by exit, the shutdown hook ensures that the transient write operation completes after the request has ostensibly ended. This architectural flaw means that attackers can persist malicious data into the database regardless of whether the initial request was deemed valid or invalid by standard CSRF checks.

Furthermore, the vulnerability is exacerbated by the existence of a GET path via the [mwform_formkey] shortcode which lacks any form of CSRF protection entirely. While many WordPress forms rely on POST requests with tokens to ensure security, this specific endpoint allows state changes through simple HTTP GET requests without verification. This design oversight simplifies exploitation significantly, as attackers do not need to craft complex payloads or trick users into clicking hidden links; they can potentially trigger the vulnerability through standard navigation or automated scripts that simply send a request with the manipulated session parameter. The combination of missing validation on object references and inadequate CSRF enforcement creates a high-severity attack vector that allows for persistent compromise of site integrity.

From an industry standards perspective, this vulnerability aligns closely with CWE-200: Information Exposure and CWE-613: Insufficient Session Expiration, but most critically it exemplifies CWE-862: Missing Authorization, where the application fails to enforce proper access controls for a specific resource. In terms of attack patterns, this behavior maps to MITRE ATT&CK technique T1505.003: Web Shell: Server Side Template Injection or more accurately T1190: Exploit Public-Facing Application, as it leverages a flaw in an internet-facing component to achieve code execution-like effects through CSS injection and data poisoning. The ability to permanently anchor poisoned transient values that never re-expire further aligns with persistence techniques described under MITRE ATT&CK T1542.003: Defacement: Client-Side, although here the defacement is achieved via injected stylesheets rather than direct HTML modification of source files.

To mitigate this vulnerability, immediate action must be taken to update the MW WP Form plugin to a version later than 5.1.8 where these validation and CSRF checks have been corrected by the developers. Until an upgrade is possible, administrators should consider disabling the specific shortcode or endpoint that triggers the vulnerable code path if feasible within their site configuration. It is also advisable to audit the wp_options table for any anomalous transient entries that may indicate prior exploitation, particularly those related to block styles or session data with unusual keys. Implementing a Web Application Firewall (WAF) rule that monitors for suspicious patterns in form submission parameters can provide an additional layer of defense by blocking requests that attempt to inject non-standard characters into the mw-wp-form_session_mw-wp-form-<FORM_ID> parameter, thereby reducing the attack surface while permanent remediation is applied.

Responsible

Wordfence

Reservation

11/02/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00646

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!