CVE DatabaseCVE-2026-39987
한국어 권고문 →
CVE-2026-399879.8/CRITICALCISA KEVCWE-306

marimo Reactive Python Notebook Pre-Auth Remote Code Execution (RCE) via Terminal WebSocket Authentication Bypass (CVE-2026-39987)

Affected Vendors
marimo-team
Affected Components
marimo
Published Date
2026-04-09

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All versions of marimo open-source Python notebook prior to 0.23.0

Impact

Unauthenticated remote attackers can establish a connection to the `/terminal/ws` endpoint, obtaining a full PTY shell and executing arbitrary system commands

Mitigation

Immediately upgrade the marimo package to version 0.23.0 or higher

Affected Products & Version Scope

All marimo versions prior to 0.23.0 (Fixed in 0.23.0)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Apply Official Security Patch (Recommended)

Upgrade your marimo dependency to version 0.23.0 or higher.

bash
# Using pip
pip install --upgrade marimo>=0.23.0

# Using poetry
poetry add marimo@latest

2. Temporary Mitigations (If patching cannot be applied immediately)

  • Network Access Control: Restrict access to the marimo server port using firewalls or security groups, allowing connections only from trusted IP addresses.
  • Reverse Proxy Authentication: Deploy a reverse proxy (e.g., Nginx, Apache, or OAuth2 Proxy) in front of marimo to enforce authentication (such as Basic Auth or OIDC) before requests reach the application.
  • WAF Rules: Configure Web Application Firewall (WAF) rules to block unauthorized WebSocket upgrade requests targeting the /terminal/ws path.
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
Due to active in-the-wild exploitation, immediately upgrade marimo to 0.23.0+ and restrict external network exposure.

Scan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds

Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

Technical Root Cause & Exploitation Mechanics

marimo is a reactive Python notebook widely adopted in data science and machine learning workflows. This vulnerability (CVE-2026-39987) stems from a missing authentication check on the terminal WebSocket endpoint /terminal/ws (CWE-306: Missing Authentication for Critical Function).

While other WebSocket endpoints (such as /ws) properly invoke validate_auth() to verify user credentials, the /terminal/ws endpoint only checks the running mode and platform support before accepting connections, completely bypassing authentication verification. Consequently, an unauthenticated attacker can initiate a WebSocket handshake with the vulnerable endpoint, spawn an interactive pseudo-terminal (PTY) shell, and execute arbitrary system commands under the privileges of the running marimo process.

This vulnerability has been assigned a CVSS score of 9.8 (Critical) and is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild.

Official Vendor Advisories & References

NVD Original English Description

marimo is a reactive Python notebook. Prior to 0.23.0, Marimo has a Pre-Auth RCE vulnerability. The terminal WebSocket endpoint /terminal/ws lacks authentication validation, allowing an unauthenticated attacker to obtain a full PTY shell and execute arbitrary system commands. Unlike other WebSocket endpoints (e.g., /ws) that correctly call validate_auth() for authentication, the /terminal/ws endpoint only checks the running mode and platform support before accepting connections, completely skipping authentication verification. This vulnerability is fixed in 0.23.0.

SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
CVE-2026-39987: marimo Reactive Python Notebook Pre-Auth Remote Code Execution (RCE) via Terminal WebSocket Authentication Bypass (CVE-2026-39987) (CVSS 9.8) | CVE Pulse