PyPI: marimo

CVE-2026-39987

Safety vulnerability ID: SFTY-20260408-74767

Safety legacy ID: pyup.io-92339

Affected versions of the marimo package are vulnerable to Remote Code Execution due to missing authentication on the terminal WebSocket endpoint. The /terminal/ws endpoint in marimo/_server/api/endpoints/terminal.py accepts WebSocket connections without calling validate_auth() or using a @requires() decorator, unlike other endpoints such as /ws which correctly enforce authentication, allowing unauthenticated users to obtain a full PTY shell. An attacker can connect to the /terminal/ws WebSocket endpoint without credentials to gain an interactive shell and execute arbitrary system commands on the host.

Created at: Apr 9, 2026Updated at: Apr 9, 2026

Overview

Marimo: Pre-Auth Remote Code Execution via Terminal WebSocket Authentication Bypass

Advisory

Affected versions of the marimo package are vulnerable to Remote Code Execution due to missing authentication on the terminal WebSocket endpoint. The /terminal/ws endpoint in marimo/_server/api/endpoints/terminal.py accepts WebSocket connections without calling validate_auth() or using a @requires() decorator, unlike other endpoints such as /ws which correctly enforce authentication, allowing unauthenticated users to obtain a full PTY shell. An attacker can connect to the /terminal/ws WebSocket endpoint without credentials to gain an interactive shell and execute arbitrary system commands on the host.

Affected Package

Affecting marimo package, versions
<0.23.0

Also affects

---

How to Fix

Upgrade
marimo
to
0.23.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more