CVE-2026-30977: Mediawiki Rawelement Style Script Xss

Using `Html::rawElement()` to generate `<style>` or `<script>` tags is highly discouraged. It does not safely escape the content against closing tag injection, nor does it automatically add Content Security Policy (CSP) nonces. This can lead to Cross-Site Scripting (XSS). Use `Html::inlineStyle()` or `Html::inlineScript()` instead.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0PHP
greprules fetch cve-2026-30977-mediawiki-rawelement-style-script-xss --engine opengrep

Description

Using `Html::rawElement()` to generate `<style>` or `<script>` tags is highly discouraged. It does not safely escape the content against closing tag injection, nor does it automatically add Content Security Policy (CSP) nonces. This can lead to Cross-Site Scripting (XSS). Use `Html::inlineStyle()` or `Html::inlineScript()` instead.