Potential XSS vulnerability in webform_submission_log

Created on 18 September 2025, 21 days ago

This was originally reported as a private security issue, but has been approved for handling the public queue by the Drupal Security Team.

Problem/Motivation

The webform_submission_log submodule has a potential XSS vulnerability because it does not sanitize log messages before displaying them.

This could be a problem if some custom code logs a message containing unescaped user input.

Steps to reproduce

1. Enabling the webform_submission_log module
2. Call something like this:

\Drupal::logger('webform_submission')->error('<img src=x onerror=alert()>', $context);

3. Browse to /admin/structure/webform/submissions/log: the JS is executed.

(dblog does not have this problem, it always filters log messages against XSS.)

Proposed resolution

We could filter log messages with Xss::filterAdmin() before displaying them (dblog does this).

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.3

Component

Code

Created by

🇫🇷France prudloff Lille

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024