Marko Cross-Site Scripting Vulnerability via Case-Insensitive Tag Breakout

Vulnerability

A cross-site scripting vulnerability has been identified in Marko versions prior to 5.38.36 and @marko/runtime-tags versions prior to 6.0.164. The issue arises when dynamic text is interpolated into <script> or <style> tags. The Marko runtime fails to properly sanitize the input, allowing an attacker to break out of the tag using non-lowercase closing tags, such as </SCRIPT> or </Style>. This could lead to the injection of arbitrary HTML or JavaScript. The vulnerability is present in any Marko template that interpolates untrusted data into <script> or <style> blocks, especially if the data comes from user input that is later rendered in these tags.

Impact

Exploitation of this vulnerability allows for cross-site scripting, with the potential for stored XSS if the injected script comes from persisted user input.

Reproduction

To reproduce this vulnerability, interpolate untrusted data into a <script> or <style> tag in a Marko template. Ensure the data includes a mixed-case closing tag, such as </SCRIPT> or </Style>. When the template is rendered, the browser will parse the mixed-case tag as a valid closing tag, terminating the script or style context and executing any injected JavaScript.

Remediation

Users should upgrade to Marko version 5.38.36 or @marko/runtime-tags version 6.0.164. As a temporary workaround, untrusted data can be pre-sanitized to remove any closing tag references before interpolation, or avoid using direct interpolation in <script> or <style> tags altogether.

Added: May 8, 2026, 6:30 PM
Updated: May 8, 2026, 6:30 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
1.7
exploitability
7.7
remediation
0.0
relevance
7.8
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.

or . This could lead to the injection of arbitrary HTML or JavaScript. The vulnerability is present in any Marko template that interpolates untrusted data into