CVE-2026-136522 in CubeWP Forms Plugin
Summary
by MITRE • 11/24/2026
CubeWP Forms before 1.1.13 contains an unauthenticated stored cross-site scripting vulnerability that allows attackers to inject malicious JavaScript by submitting unregistered field names through the public REST route cubewp-custom-form/v1/submit/, which bypasses its own nonce check and saves unsanitized values due to a missing default case in the sanitizer, later rendered unescaped on the admin Leads detail page. Attackers can send a single crafted GET request containing a script payload in a custom form field to execute arbitrary JavaScript in an administrator's wp-admin session when the lead is viewed, enabling full site takeover such as creating a new administrator account.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/24/2026
The vulnerability identified in CubeWP Forms prior to version 1.1.13 represents a critical security flaw rooted in improper input validation and output encoding within the plugin’s REST API implementation. Specifically, this is an unauthenticated stored cross-site scripting (XSS) vulnerability that exploits weaknesses in how form data is processed and subsequently displayed. The attack vector centers on the public-facing REST endpoint cubewp-custom-form/v1/submit/, which is designed to handle submissions from custom forms created by site administrators. Under normal circumstances, such endpoints should enforce strict authentication checks or nonce validations to prevent unauthorized users from injecting malicious content into the system’s database. However, in this specific implementation, the validation logic fails to properly restrict field names that are not explicitly registered within the form configuration. This oversight allows an attacker to submit arbitrary key-value pairs where the keys correspond to unregistered fields, effectively bypassing the intended security controls including nonce verification mechanisms designed to prevent cross-site request forgery and unauthorized data submission.
The technical core of this flaw lies in a missing default case within the sanitizer function responsible for processing form submissions. When a user submits a form containing field names that do not match any predefined registered fields, the code fails to reject or sanitize these inputs as expected. Instead, it proceeds to save the unsanitized values directly into the WordPress database associated with the lead records. This behavior constitutes an input validation failure where the application trusts data from untrusted sources without adequate verification of its structure or content. The stored nature of this vulnerability means that once a malicious payload is injected via a crafted GET request, it persists in the backend storage until manually removed by an administrator. This persistence transforms what might otherwise be a transient session-based attack into a long-term threat capable of affecting multiple users over time.
The operational impact becomes severe when an administrator accesses the admin Leads detail page to review submissions made through these forms. The system renders the stored form data directly in this interface without applying appropriate output encoding or escaping mechanisms. Consequently, any JavaScript code embedded within the previously submitted malicious field values is executed by the browser of the viewing administrator. This execution occurs within the context of the administrator’s active session, granting the attacker the same privileges as the logged-in user. Since WordPress administrators possess full control over the website environment, this capability enables a complete site takeover scenario. An attacker can exploit this trust relationship to perform actions such as creating new administrative accounts, modifying core plugin settings, injecting backdoors into theme files, or exfiltrating sensitive data from the database and server configuration.
From an industry standard perspective, this vulnerability aligns with CWE-79, which describes Improper Neutralization of Input During Web Page Generation commonly known as Cross-site Scripting (XSS). The specific mechanism here involves stored XSS where malicious scripts are permanently stored on target servers via input validation failures. Additionally, the exploitation technique maps to MITRE ATT&CK techniques related to Client-side Injection and potentially Account Manipulation if used for privilege escalation. The lack of proper nonce verification also touches upon CWE-352 regarding Cross-Site Request Forgery (CSRF), although the primary impact is driven by the XSS component rather than state-changing requests alone. These classifications highlight the multifaceted nature of the flaw, involving both input handling deficiencies and output rendering errors that collectively compromise system integrity.
Mitigation strategies for this vulnerability require immediate action to patch the underlying code defects in CubeWP Forms version 1.1.13 or later. Developers must ensure that all form submissions undergo rigorous validation against a whitelist of allowed field names rather than relying on implicit acceptance of unknown keys. The sanitizer function needs to be updated to include a default case that explicitly rejects or strips any input not matching registered fields, thereby preventing the storage of arbitrary data structures. Furthermore, output encoding must be enforced consistently across all admin interfaces where user-generated content is displayed. Implementing Content Security Policy headers can also provide an additional layer of defense by restricting script execution sources. Site administrators should update their plugins promptly and monitor for any suspicious activity in lead submissions that may indicate prior exploitation attempts before the patch was applied.