The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-39987

CVE-2026-39987: marimo Python Notebook RCE Vulnerability

CVE-2026-39987 is a pre-authentication remote code execution flaw in marimo Python notebook that allows attackers to execute arbitrary commands via unauthenticated WebSocket access. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published: April 9, 2026

CVE-2026-39987 Overview

CVE-2026-39987 is a critical Pre-Authentication Remote Code Execution (RCE) vulnerability affecting marimo, a reactive Python notebook application. The vulnerability exists in the terminal WebSocket endpoint /terminal/ws, which lacks proper authentication validation, allowing unauthenticated attackers to obtain a full PTY (pseudo-terminal) shell and execute arbitrary system commands on the host system.

Unlike other WebSocket endpoints in the marimo application (such as /ws) that correctly implement authentication by calling validate_auth(), the /terminal/ws endpoint only verifies the running mode and platform support before accepting connections. This oversight completely bypasses authentication verification, creating a direct path for remote attackers to gain shell access without any credentials.

Critical Impact

Unauthenticated attackers can execute arbitrary system commands with the privileges of the marimo process, potentially leading to complete system compromise, data exfiltration, lateral movement, or deployment of additional malware.

Affected Products

  • marimo versions prior to 0.23.0

Discovery Timeline

  • 2026-04-09 - CVE-2026-39987 published to NVD
  • 2026-04-09 - Last updated in NVD database

Technical Details for CVE-2026-39987

Vulnerability Analysis

This vulnerability is classified under CWE-306 (Missing Authentication for Critical Function). The flaw resides in the terminal WebSocket endpoint implementation within marimo's server architecture. When a WebSocket connection is established to /terminal/ws, the server fails to invoke the validate_auth() function that other sensitive endpoints utilize for authentication verification.

The impact of this vulnerability is severe due to the nature of what the terminal endpoint provides—a full PTY shell. An attacker who successfully exploits this vulnerability gains the ability to execute arbitrary commands with the same privileges as the marimo process. This could include reading sensitive files, modifying data, installing backdoors, pivoting to other systems on the network, or disrupting service operations.

Root Cause

The root cause is a missing authentication check in the terminal WebSocket endpoint handler. While the endpoint performs checks for running mode and platform compatibility (whether the system supports terminal functionality and isn't running in Pyodide or restricted Windows modes), it completely omits the critical step of validating user authentication. This represents an inconsistency in the security implementation across different WebSocket endpoints in the marimo codebase.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Identifying a marimo instance exposed to the network
  2. Establishing a WebSocket connection directly to the /terminal/ws endpoint
  3. Bypassing all authentication since the endpoint doesn't validate credentials
  4. Obtaining a full PTY shell session
  5. Executing arbitrary system commands with the privileges of the marimo process

The security patch adds the missing authentication by importing and calling validate_auth from marimo._server.api.auth:

python
 from starlette.websockets import WebSocket, WebSocketDisconnect, WebSocketState
 
 from marimo import _loggers
+from marimo._server.api.auth import validate_auth
 from marimo._server.api.deps import AppState
+from marimo._server.codes import WebSocketCodes
 from marimo._server.router import APIRouter
 from marimo._session.model import SessionMode
 from marimo._utils.platform import is_pyodide, is_windows

Source: GitHub Commit Changes

Detection Methods for CVE-2026-39987

Indicators of Compromise

  • Unexpected WebSocket connections to the /terminal/ws endpoint from external or unauthorized IP addresses
  • Unusual command execution patterns or processes spawned by the marimo process
  • Network traffic showing WebSocket upgrade requests to terminal endpoints without prior authenticated session establishment
  • Log entries indicating terminal sessions initiated without corresponding authentication events

Detection Strategies

  • Monitor WebSocket connection logs for /terminal/ws endpoint access patterns and correlate with authentication events
  • Implement network intrusion detection rules to alert on WebSocket connections to marimo terminal endpoints from untrusted sources
  • Deploy endpoint detection to identify suspicious child processes spawned by Python processes running marimo
  • Review access logs for patterns indicating reconnaissance or exploitation attempts against WebSocket endpoints

Monitoring Recommendations

  • Enable verbose logging for marimo server to capture all WebSocket connection attempts
  • Configure SIEM alerts for connections to marimo instances from external networks
  • Implement baseline monitoring for normal terminal usage patterns to detect anomalous activity
  • Monitor for process creation events linked to the marimo application that deviate from expected behavior

How to Mitigate CVE-2026-39987

Immediate Actions Required

  • Upgrade marimo to version 0.23.0 or later immediately
  • Restrict network access to marimo instances using firewall rules, limiting exposure to trusted networks only
  • Audit systems running marimo for signs of compromise, particularly checking for unauthorized processes or modified files
  • If upgrade is not immediately possible, disable or block access to the /terminal/ws endpoint at the network level

Patch Information

The vulnerability has been fixed in marimo version 0.23.0. The fix properly implements authentication for the terminal WebSocket endpoint by adding the validate_auth() call that was missing from the original implementation. Organizations should update to version 0.23.0 or later to remediate this vulnerability.

For more details, see the GitHub Security Advisory and the Pull Request #9098.

Workarounds

  • Block external access to marimo instances using network-level controls (firewall rules, security groups)
  • Deploy a reverse proxy with authentication in front of marimo to add an additional authentication layer
  • Disable terminal functionality entirely if not required by removing or blocking access to the /terminal/ws route
  • Implement network segmentation to ensure marimo instances are only accessible from trusted internal networks
bash
# Example: Block external access to marimo terminal endpoint using iptables
# Allow only localhost connections to the marimo port (adjust port as needed)
iptables -A INPUT -p tcp --dport 2718 -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --dport 2718 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMarimo

  • SeverityCRITICAL

  • CVSS Score9.3

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-306
  • Technical References
  • GitHub Commit Changes

  • GitHub Pull Request

  • GitHub Security Advisory GHSA-2679-6mx9-h9xc
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English