CVE-2026-2707
Received Received - Intake
Stored XSS in weForms WordPress Plugin via REST API Entries

Publication date: 2026-03-11

Last updated on: 2026-03-11

Assigner: Wordfence

Description
The weForms plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the REST API entry submission endpoint in all versions up to, and including, 1.6.27. This is due to inconsistent input sanitization between the frontend AJAX handler and the REST API endpoint. When entries are submitted via the REST API (`/wp-json/weforms/v1/forms/{id}/entries/`), the `prepare_entry()` method in `class-abstract-fields.php` receives the WP_REST_Request object as `$args`, bypassing the `weforms_clean()` fallback that sanitizes `$_POST` data for frontend submissions. The base field handler only applies `trim()` to the value. This makes it possible for authenticated attackers, with Subscriber-level access and above, to inject arbitrary web scripts into form entry hidden field values via the REST API that execute when an administrator views the form entries page, where data is rendered using a Vue.js `v-html` directive without escaping.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-11
Last Modified
2026-03-11
Generated
2026-05-27
AI Q&A
2026-03-11
EPSS Evaluated
2026-05-25
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
weforms weforms to 1.6.27 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

[{'type': 'paragraph', 'content': 'CVE-2026-2707 is a Stored Cross-Site Scripting (XSS) vulnerability in the weForms WordPress plugin affecting all versions up to and including 1.6.27. The issue arises because the plugin inconsistently sanitizes input data submitted via the REST API endpoint for form entries. Specifically, when entries are submitted through the REST API, the sanitization fallback used for frontend AJAX submissions is bypassed, allowing malicious scripts to be injected into hidden form field values.'}, {'type': 'paragraph', 'content': "Authenticated users with Subscriber-level access or higher can exploit this by submitting crafted payloads containing arbitrary web scripts via the REST API. These scripts are stored and later executed when an administrator views the form entries page, which renders the data using Vue.js's v-html directive without escaping, enabling the execution of injected JavaScript."}, {'type': 'paragraph', 'content': 'The vulnerability was addressed by sanitizing entry values during processing and replacing unsafe v-html rendering with escaped text interpolation in the admin interface, limiting raw HTML rendering to safe field types only.'}] [1, 4]


How can this vulnerability impact me? :

[{'type': 'paragraph', 'content': 'This vulnerability allows an authenticated user with Subscriber-level access or higher to inject malicious JavaScript code into form entries via the REST API. When an administrator views these entries in the WordPress admin interface, the malicious scripts execute in their browser context.'}, {'type': 'list_item', 'content': "Execution of arbitrary JavaScript in the administrator's browser, potentially leading to session hijacking or credential theft."}, {'type': 'list_item', 'content': 'Compromise of the WordPress admin interface through unauthorized actions performed by the injected scripts.'}, {'type': 'list_item', 'content': 'Potential spread of malware or redirection to malicious sites via the injected scripts.'}, {'type': 'paragraph', 'content': 'Overall, this vulnerability can lead to a significant security breach by allowing low-privileged users to execute code in the context of high-privileged administrators.'}] [4]


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability involves stored Cross-Site Scripting (XSS) via the weForms WordPress plugin REST API entry submission endpoint. Detection involves identifying malicious payloads submitted to the REST API endpoint `/wp-json/weforms/v1/forms/{id}/entries/` that contain suspicious script or HTML injection attempts in hidden form fields.'}, {'type': 'paragraph', 'content': 'To detect exploitation attempts or presence of this vulnerability on your system, you can monitor HTTP POST requests to the REST API endpoint for suspicious payloads containing HTML or JavaScript code, especially in hidden fields.'}, {'type': 'list_item', 'content': 'Use web server or application logs to search for POST requests to `/wp-json/weforms/v1/forms/` with payloads containing suspicious strings such as `<script>`, `onerror=`, or other HTML tags.'}, {'type': 'list_item', 'content': 'Example command to search Apache or Nginx logs for suspicious payloads (adjust log path accordingly):'}, {'type': 'list_item', 'content': "grep -i -E 'wp-json/weforms/v1/forms/.*/entries' /var/log/apache2/access.log | grep -i -E '<script|onerror|<img|javascript:'"}, {'type': 'list_item', 'content': 'Use WordPress REST API monitoring or logging plugins to capture and analyze REST API requests for suspicious content.'}, {'type': 'list_item', 'content': 'Check the stored form entries in the WordPress database for injected scripts in hidden fields by querying the entries table if accessible.'}, {'type': 'paragraph', 'content': 'Note that exploitation requires authenticated users with Subscriber-level access and above, so monitoring user activity and API usage by such users is also recommended.'}] [4]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps for CVE-2026-2707 involve applying the security patch released for the weForms plugin that sanitizes form entry data submitted via the REST API and prevents unsafe HTML rendering in the WordPress admin interface.

  • Update the weForms plugin to the latest version that includes the fix for CVE-2026-2707 (version above 1.6.27).
  • If immediate update is not possible, restrict REST API access to trusted users only, especially limiting Subscriber-level users from submitting form entries via the REST API.
  • Monitor and audit form entries for suspicious or injected content and remove any malicious entries.
  • Implement Web Application Firewall (WAF) rules to detect and block attempts to submit malicious scripts via the REST API endpoint.

The patch includes sanitizing scalar entry values during the `prepare_entry()` process and replacing unsafe Vue.js `v-html` rendering with escaped interpolation to prevent execution of injected scripts.

Applying the official patch or plugin update is the most effective and recommended mitigation.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart