XSS via block settings

Created on 1 December 2022, over 1 year ago
Updated 9 March 2024, 4 months ago

Problem/Motivation

This module has an XSS vector via the block settings form.
The settings form has a field <Image-editor header content that uses the text format form element type, however the input format selected is not taken into consideration when rendering the block
Instead the |raw filter is used in twig, leading to XSS.

Please note I'm reporting this in public because the module does not opt into security coverage.
Please note I tried to contact the maintainer in private via their contact form and waited 7 days before reporting.

Steps to reproduce

Use a filtered text format such as basic_html, turn off javascript, submit the form with this in the header
<script type="text/javascript">alert('yo');</script>
When viewing the block the Javascript is executed.

Proposed resolution

Use a ProcessedText render array to achieve filtering without escaping

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia larowlan ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ.au GMT+10

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

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.69.0 2024