Skip to main content
Vulnerability Database/CVE-2026-101921

CVE-2026-101921: WPForms WordPress Plugin XSS Vulnerability

CVE-2026-101921 is a reflected cross-site scripting flaw in WPForms WordPress plugin allowing attackers to inject malicious scripts. This post explains its impact, affected versions, and mitigation steps.

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-2026-101921 Overview

CVE-2026-101921 is a Reflected Cross-Site Scripting (XSS) vulnerability [CWE-79] in the WPForms – AI Form Builder plugin for WordPress. The flaw affects all versions up to and including 2.0.2.1. It stems from insufficient input sanitization and output escaping of an attacker-controlled query variable referenced by the {query_var} Smart Tag. Unauthenticated attackers can inject arbitrary web scripts that execute when a user clicks a crafted link. Exploitation requires that an administrator previously saved a form whose description embeds a {query_var} Smart Tag inside an iframe srcdoc attribute and enabled Show Description on a public page.

Critical Impact

Successful exploitation enables script execution in a victim's browser session, allowing session theft, phishing redirects, or forced actions in the context of the WordPress site.

Affected Products

  • WPForms Lite plugin for WordPress — versions up to and including 2.0.2.1
  • WPForms AI Form Builder (Contact, Payment, Survey, Quiz forms)
  • WordPress sites with vulnerable form configurations exposing Show Description publicly

Discovery Timeline

  • 2026-10-10 - CVE-2026-101921 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-101921

Vulnerability Analysis

The vulnerability resides in how the WPForms plugin handles the {query_var} Smart Tag when it is rendered inside a form description. Smart Tags are placeholders that WPForms expands at render time with dynamic values, including arbitrary HTTP query parameters supplied by the request. When an administrator saves a form whose description contains an iframe with a srcdoc attribute referencing {query_var}, the plugin substitutes the attacker-chosen parameter value directly into the HTML output without adequate sanitization or context-aware escaping.

Because srcdoc content is parsed as an inline HTML document by the browser, injected markup executes within the embedded frame. An unauthenticated attacker crafts a URL containing a malicious value in the query parameter referenced by the Smart Tag and tricks a user into following the link. The injected script then runs in the context of the WordPress origin.

Root Cause

The root cause is missing output escaping in the Smart Tag replacement pipeline. Relevant code paths include src/SmartTags/SmartTag/QueryVar.php (query value retrieval), src/SmartTags/SmartTags.php (tag replacement), and src/Frontend/Classic.php (description rendering). Values retrieved from the request were inserted into HTML attribute context without encoding, violating standard contextual output encoding practice.

Attack Vector

Exploitation is network-based and requires user interaction. The attacker must craft a link targeting a page that renders a vulnerable form description. User interaction is required to trigger the payload, and the resulting script executes in a scope that crosses the original rendering boundary via the iframe srcdoc sink. The attack succeeds only on sites whose administrators have already configured a form description embedding {query_var} inside srcdoc with Show Description enabled on a public page.

No verified public proof-of-concept code is available. Refer to the Wordfence Vulnerability Report and the WPForms Changeset 3730630 for upstream code details.

Detection Methods for CVE-2026-101921

Indicators of Compromise

  • Inbound HTTP GET requests to pages hosting WPForms forms containing query parameters with HTML tags, <script> fragments, or javascript: URIs
  • Web server access logs showing abnormal query strings referencing parameter names used in a form's {query_var} Smart Tag
  • Unexpected iframe or script execution reported by users visiting form pages
  • Referrer values indicating external phishing or redirector domains linking into form pages

Detection Strategies

  • Audit saved WPForms forms for descriptions that contain {query_var} Smart Tags inside iframe srcdoc attributes
  • Review published pages and posts for embedded forms with Show Description enabled
  • Deploy a Web Application Firewall rule to flag query parameters containing HTML control characters delivered to pages that render WPForms shortcodes
  • Monitor WordPress plugin inventory and version data for installations of wpforms-lite at or below version 2.0.2.1

Monitoring Recommendations

  • Enable logging on the reverse proxy or WAF to capture full query strings for pages that host WPForms output
  • Alert on client-side Content Security Policy (CSP) violation reports originating from form pages
  • Track outbound requests from browsers to unexpected domains following visits to form pages, which may indicate successful script execution

How to Mitigate CVE-2026-101921

Immediate Actions Required

  • Update WPForms Lite to a version newer than 2.0.2.1 that includes changeset 3730630
  • Inventory all WPForms forms and remove {query_var} Smart Tags from form descriptions, especially inside iframe srcdoc attributes
  • Disable Show Description on public-facing form embeds until the plugin is patched
  • Review WordPress access and WAF logs for suspicious query string activity against pages hosting WPForms

Patch Information

The WPForms maintainers addressed the issue in Changeset 3730630. The fix updates the Smart Tag replacement logic in src/SmartTags/SmartTags.php to apply proper sanitization and escaping to request-derived values. Review the Changeset Comparison for the full diff.

Workarounds

  • Remove or edit form descriptions that embed {query_var} Smart Tags inside HTML attributes until patched
  • Disable the Show Description option on affected forms
  • Deploy a WAF rule blocking HTML metacharacters in query parameters referenced by vulnerable forms
  • Apply a strict Content Security Policy restricting inline script execution on pages hosting WPForms output
bash
# Example WP-CLI command to inventory installed WPForms version
wp plugin get wpforms-lite --field=version

# Update WPForms Lite to the latest patched release
wp plugin update wpforms-lite

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.