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-96371 Overview
CVE-2026-96371 is a stored Cross-Site Scripting (XSS) vulnerability in the Drupal Webform contributed module. The issue is categorized under [CWE-267] Privilege Defined with Unsafe Actions, meaning privileges granted to certain Webform users permit actions that can inject persistent script content. An authenticated attacker with low privileges can store malicious JavaScript that executes in the browsers of other users who view the affected form or submission output. The flaw affects Webform versions 0.0.0 through 6.2.12 and 6.3.0 through 6.3.1.
Critical Impact
Authenticated low-privileged users can persist malicious scripts that execute in other users' sessions, enabling account actions, data theft, and lateral access within the Drupal site.
Affected Products
- Drupal Webform module versions 0.0.0 to 6.2.12
- Drupal Webform module versions 6.3.0 to 6.3.1
- Drupal sites running the Webform contributed module with form-authoring privileges delegated to non-administrators
Discovery Timeline
- 2026-10-22 - CVE-2026-96371 published to the National Vulnerability Database
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-96371
Vulnerability Analysis
The Drupal Webform module allows site builders to construct forms, including markup and element configuration options. Certain configuration fields accept HTML or JavaScript content that is later rendered to other users without adequate sanitization. Because the privilege model lets non-administrative roles edit these fields, a user with form-authoring access can store script payloads that execute when another user, including an administrator, visits the form or related submission view.
The vulnerability requires authentication and some level of Webform configuration access. Exploitation does not require user interaction beyond navigating to the affected page. The script executes within the Drupal site's origin, giving it access to session cookies, CSRF tokens, and authenticated API calls available to the victim.
Root Cause
The root cause is a mismatch between the privileges granted to Webform editors and the trust level required to safely render their inputs. [CWE-267] describes exactly this condition: a role is permitted to perform actions, in this case storing rich content, that the application later treats as trusted. Output encoding and filter application are insufficient for the privilege boundary, so stored content reaches the browser as executable script.
Attack Vector
The attack vector is network-based and requires an authenticated session with Webform editing rights. An attacker injects script content into a vulnerable Webform configuration field. The payload is persisted in the Drupal database. When another authenticated user, typically an administrator or form reviewer, loads the affected form or submission interface, the browser executes the stored script in the context of the Drupal site. Refer to the Drupal Security Advisory for element-level technical details.
Detection Methods for CVE-2026-96371
Indicators of Compromise
- Webform configuration entities containing <script>, onerror=, onload=, or javascript: strings in element properties such as markup, titles, descriptions, or default values
- Unexpected changes to Webform configuration by non-administrative accounts in Drupal's recent log messages (admin/reports/dblog)
- Outbound requests from administrator browsers to unfamiliar domains shortly after viewing a Webform page
- New or elevated Drupal user accounts created shortly after an administrator viewed a modified form
Detection Strategies
- Audit stored Webform YAML configuration (webform.webform.* config entities) for HTML event handlers or script tags using drush config:get or direct database queries against the config table.
- Review audit logs for Webform create and update actions performed by accounts that do not normally author forms.
- Instrument a Content Security Policy (CSP) in report-only mode to surface inline script execution on Webform pages.
Monitoring Recommendations
- Enable Drupal's database logging and watchdog alerting for configuration changes to Webform entities.
- Forward Drupal and web server logs to a centralized analytics platform to correlate authoring activity with downstream administrative sessions.
- Monitor administrative sessions for anomalous XHR or fetch activity originating from Webform rendering URLs.
How to Mitigate CVE-2026-96371
Immediate Actions Required
- Upgrade the Webform module to a fixed release above 6.2.12 for the 6.2.x branch or above 6.3.1 for the 6.3.x branch, as published in the Drupal Security Advisory.
- Review and revoke Webform editing permissions from roles that do not require them, particularly administer webform and edit webform elements style permissions.
- Inspect existing Webform configurations for injected script content and remove any unauthorized payloads before upgrading.
Patch Information
The Drupal Security Team addressed CVE-2026-96371 in updated releases of the Webform contributed module. Site operators should install the latest patched version from Drupal.org and clear caches with drush cr after deployment. Full remediation details and fixed version numbers are documented in the Drupal Security Advisory sa-contrib-2026-166.
Workarounds
- Restrict Webform authoring permissions to trusted administrator roles until patching is complete.
- Deploy a strict Content Security Policy that disallows inline scripts on authenticated administrative paths.
- Place Webform administrative routes behind additional access controls such as IP allow-listing or VPN enforcement.
# Example: upgrade the Webform module with Composer and clear caches
composer update drupal/webform --with-dependencies
drush updatedb -y
drush cache:rebuild
# Review roles that currently hold Webform authoring permissions
drush role:list
drush user:information --fields=name,roles --filter='roles=webform_editor'
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

