Form Maker by 10Web <= 1.15.35 - Unauthenticated Stored Cross-Site Scripting via Hidden Field
Description
The Form Maker plugin for WordPress is vulnerable to Stored Cross-Site Scripting via hidden field values in all versions up to, and including, 1.15.35. This is due to insufficient output escaping when displaying hidden field values in the admin submissions list. The plugin uses html_entity_decode() on user-supplied hidden field values without subsequent escaping before output, which converts HTML entity-encoded payloads back into executable JavaScript. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in the admin submissions view that will execute whenever an administrator accesses the submissions list.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:LTechnical Details
<=1.15.35Source Code
WordPress.org SVNThis research plan targets **CVE-2026-1058**, a stored Cross-Site Scripting (XSS) vulnerability in the "Form Maker by 10Web" plugin. The vulnerability arises because the plugin uses `html_entity_decode()` on hidden field values before displaying them in the admin submissions list, without subsequent…
Show full research plan
This research plan targets CVE-2026-1058, a stored Cross-Site Scripting (XSS) vulnerability in the "Form Maker by 10Web" plugin. The vulnerability arises because the plugin uses html_entity_decode() on hidden field values before displaying them in the admin submissions list, without subsequent escaping.
1. Vulnerability Summary
- Vulnerability: Unauthenticated Stored XSS.
- Affected Component: Admin Submissions View (Submissions list/details).
- Root Cause: Improper output neutralization. User-supplied input for "Hidden" type fields is processed with
html_entity_decode(). If an attacker submits a payload using HTML entities (e.g.,<script>), the plugin decodes it back into executable HTML/JavaScript (<script>) and echoes it to the administrator's browser. - Affected Versions: <= 1.15.35.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
form_maker_submit(inferred from standard Form Maker submission logic). - Vulnerable Parameter: The value associated with a "Hidden" field type. These are typically sent in the
POSTbody as part of the form data (e.g.,submission_dataor indexed field parameters likefield_1,field_2). - Authentication: None (Unauthenticated).
- Preconditions: A form must exist that contains at least one "Hidden" field.
3. Code Flow
- Submission (Public):
- The frontend form sends a
POSTrequest toadmin-ajax.phpwithaction=form_maker_submit(inferred). - The plugin receives the data and saves it to the
{wp_prefix}form_maker_submitstable.
- The frontend form sends a
- Processing (Admin):
- An administrator navigates to Form Maker > Submissions.
- The plugin fetches the submissions for the specific form.
- The code iterates through the fields. When it encounters a field defined as type
hidden, it retrieves the stored value. - The Sink: The plugin calls
html_entity_decode($field_value)andechos the result directly into the table cell or detail view. - If the value was
<img src=x onerror=alert(1)>, it becomes<img src=x onerror=alert(1)>in the DOM, triggering execution.
4. Nonce Acquisition Strategy
Form Maker typically requires a frontend nonce for form submission to prevent automated spam.
- Identify Shortcode: The plugin uses
[form_maker id="ID"]. - Create Test Page:
wp post create --post_type=page --post_status=publish --post_title="Contact" --post_content='[form_maker id="1"]'(assuming Form ID 1 exists).
- Navigate and Extract:
- Use
browser_navigateto the newly created page. - Form Maker localizes its data in a variable, often named
fm_objector similar, or attaches nonces to the form DOM. - Inferred JS Variable:
window.fm_object?.ajax_nonceorwindow.fm_ajax?.nonce. - Alternative: Extract from the hidden input field in the form:
browser_eval("document.querySelector('input[name=\"fm_nonce\"]')?.value").
- Use
5. Exploitation Strategy
The goal is to submit a form containing a payload in a hidden field.
- Step 1: Discovery
- Locate an existing form ID:
wp db query "SELECT id FROM wp_form_maker" - Check if it has a hidden field:
wp db query "SELECT * FROM wp_form_maker WHERE id=1"(Analyze theform_fieldscolumn which is usually JSON).
- Locate an existing form ID:
- Step 2: Setup (If needed)
- If no form exists or no form has a hidden field, create one via WP-CLI or the UI (see Section 6).
- Step 3: Submission Request
- Method:
POST - URL:
http://localhost:8080/wp-admin/admin-ajax.php - Content-Type:
application/x-www-form-urlencoded - Body (Example):
action=form_maker_submit& form_id=1& field_1=NormalData& field_HIDDEN_ID=<img src=x onerror=alert(document.domain)>& nonce=[EXTRACTED_NONCE] - Note:
field_HIDDEN_IDrepresents the actual ID/name of the hidden field in the form.
- Method:
6. Test Data Setup
- Create a Form: Ensure a form exists with a hidden field.
- If creating manually via WP-CLI is complex due to serialized/JSON data, use
browser_navigatetowp-admin/admin.php?page=form_makerand create a form with one "Hidden" field.
- If creating manually via WP-CLI is complex due to serialized/JSON data, use
- Identify Field IDs: Note the ID assigned to the hidden field (e.g.,
4). - Publish Form: Create a page with the shortcode
[form_maker id="X"]where X is the new form ID.
7. Expected Results
- The
http_requestfor submission should return a success message (e.g.,{"status":"success"}or a success redirect). - When an admin logs in and visits Form Maker > Submissions, the browser should execute the JavaScript in the context of the WordPress admin.
8. Verification Steps
- Database Check:
wp db query "SELECT * FROM wp_form_maker_submits ORDER BY id DESC LIMIT 1"- Verify the
element_valuefor the hidden field contains the payload<img src=x onerror=alert(document.domain)>.
- UI Check (Automated):
- Log in as admin.
- Navigate to the submissions page for the specific form.
- Use
browser_eval("document.body.innerHTML.includes('<img src=x onerror=alert')")to confirm the decoded payload is present in the source.
9. Alternative Approaches
- Double Encoding: If the plugin has some sanitization on submission, try double encoding the payload:
&lt;script&gt;. - Submission via Frontend: Instead of
admin-ajax.php, navigate to the published page usingbrowser_navigateand usebrowser_typeto fill and submit the form, which ensures all required JS-generated fields are included. - Different Hidden Source: Form Maker hidden fields can sometimes be populated via URL parameters. Try:
http://localhost:8080/contact-page/?hidden_field_name=<script>alert(1)</script>and then submitting the form normally.
Summary
The Form Maker plugin for WordPress is vulnerable to Unauthenticated Stored Cross-Site Scripting via hidden field values. The plugin incorrectly uses html_entity_decode() on user-supplied hidden field input before displaying it in the admin submissions list, allowing attackers to bypass initial entity encoding and execute arbitrary JavaScript in an administrator's browser session.
Vulnerable Code
// Inferred from research plan code flow analysis // Located in the submissions display logic, likely in admin views if ($field_type === 'hidden') { // The plugin retrieves the stored value and decodes entities without subsequent escaping echo html_entity_decode($field_value); }
Security Fix
@@ -10,7 +10,7 @@ if ($field_type == 'hidden') { - echo html_entity_decode($field_value); + echo esc_html($field_value); }
Exploit Outline
1. Identify a public-facing form created by Form Maker that contains at least one 'Hidden' field type. 2. Extract the required submission nonce (typically found in the form's HTML as a hidden input named 'fm_nonce' or localized in the 'fm_object' JavaScript variable). 3. Craft a POST request to /wp-admin/admin-ajax.php with the action 'form_maker_submit' and the target form ID. 4. In the parameter corresponding to the hidden field, include an HTML-entity-encoded XSS payload (e.g., '<img src=x onerror=alert(document.domain)>'). 5. Wait for an administrator to view the submissions for that specific form in the WordPress dashboard. 6. Upon loading the submissions list, the plugin decodes the entity-encoded payload back into executable HTML, triggering the script in the admin's session.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.