Marko: XSS via case-insensitive script/style closing tag bypass in runtime HTML escaping
CVE-2026-41591GHSA-x9fj-57fh-c8wq
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (@marko/runtime-tags 6.0.164; marko 5.38.36), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- < 6.0.164
- Fixed in
- 6.0.164
npm marko
- Affected
- < 5.38.36
- Fixed in
- 5.38.36
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-x9fj-57fh-c8wq lists affected ranges: npm marko >=0 =0 <6.0.164 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-x9fj-57fh-c8wq lists affected ranges: npm marko >=0 =0 <6.0.164
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 6.4 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- EPSS
- CVE-2026-41591: 0.23% estimated exploitation activity in the next 30 days; percentile 13.47 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary 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. Details The affected helpers used case-sensitive regular expressions to detect attempts at closing the surrounding tag: HTML tag names are case-insensitive in the browser parser, so inputs such as </SCRIPT, </Script, or </sTyLe were not matched by these regexes and passed through the helpers unchanged. A browser rendering the output treats the mixed-case end tag as a valid closing tag, terminating the script or style context, and then parses anything that follows as HTML. The Marko compiler routes interpolated values inside <script and <style tags through these helpers automatically (see native-tag.ts:1080-1085), so application…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 2 · amended ·
Amended from ghsa record GHSA-x9fj-57fh-c8wq
- Revision 1 · created ·
Published from osv record GHSA-x9fj-57fh-c8wq
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2026-41591 Advisory: Marko: XSS via case-insensitive script/style closing tag bypass in runtime HTML escaping IDs: CVE-2026-41591, GHSA-x9fj-57fh-c8wq Record: https://patchnext.com/advisories/cve-2026-41591 (revision 2, source checked 26 Oct 2026, 12:52 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 6.4) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: @marko/runtime-tags 6.0.164; marko 5.38.36. A vendor fix does not mean a deployment is fixed. ## Affected components - npm @marko/runtime-tags: affected < 6.0.164; fixed in 6.0.164 - npm marko: affected < 5.38.36; fixed in 5.38.36 ## Suggested inspection (read-only) - `npm ls @marko/runtime-tags --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. - `npm ls marko --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on @marko/runtime-tags, marko. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/GHSA-x9fj-57fh-c8wq (OSV record GHSA-x9fj-57fh-c8wq lists affected ranges: npm marko >=0 =0 <6.0.164 (fixed)) - Verified: https://github.com/advisories/GHSA-x9fj-57fh-c8wq (GitHub-reviewed advisory GHSA-x9fj-57fh-c8wq lists affected ranges: npm marko >=0 =0 <6.0.164) Commands are suggestions: review each one before running it.
Loading voting…