Problem/Motivation

In this Drupal application, untrusted roles (such as Anonymous or basic Authenticated users) may be assigned text formats that allow dangerous HTML tags or attributes (for example <script>, inline event handlers, or iframes), which can lead to XSS and content injection vulnerabilities across user-generated content.

Steps to reproduce

Proposed resolution

Add a new Security FitCheck plugin UntrustedHtmlInputCheck that:

  • Inspects Drupal text format configuration and the roles allowed to use each format, focusing on untrusted roles like Anonymous and standard Authenticated users.
  • Checks whether these formats permit dangerous HTML (or grant access to “Full HTML”/unfiltered HTML) for those roles.
  • Marks the check as failing with FitWeight::High (or FitWeight::Critical if untrusted roles can use Full/Unfiltered HTML) and lists the affected formats and roles so administrators can restrict access or tighten allowed tags.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork drupalfit-3558966

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

harivansh created an issue. See original summary.

harivansh’s picture

Issue summary: View changes
harivansh’s picture

shubham.prakash made their first commit to this issue’s fork.

shubham.prakash’s picture

Status: Active » Needs review
harivansh’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

harivansh’s picture

Status: Fixed » Closed (fixed)