
Security research and SOC investigation of CVE-2026-39987 using Docker, Nginx, Linux process monitoring, Splunk SIEM, and SPL detection rules.
Security research and experimental validation of CVE-2026-39987, a missing authentication vulnerability affecting Marimo's terminal WebSocket endpoint.
This project documents the vulnerability's root cause, local reproduction results, official security patch, and regression testing in controlled Docker environments.
| Field | Details |
|---|---|
| CVE | CVE-2026-39987 |
| Product | Marimo |
| Vulnerability Type | Missing Authentication / Pre-authentication RCE |
| CWE | CWE-306 |
| Severity | Critical |
| Affected Version Tested | 0.20.4 |
| Patched Version Tested | 0.23.0 |
| Affected Endpoint | /terminal/ws |
| Security Advisory | GHSA-2679-6mx9-h9xc |
The vulnerability arises from missing authentication validation in Marimo's terminal WebSocket endpoint.
In the affected implementation, terminal availability and application mode are checked without properly validating the connecting client's identity.
This can expose server-side terminal functionality to unauthenticated clients under vulnerable configurations.
The project focused on:
| Component | Configuration |
|---|---|
| Host Operating System | Windows 11 |
| Container Platform | Docker Desktop |
| Vulnerable Environment | Marimo 0.20.4 |
| Patched Environment | Marimo 0.23.0 |
| Container Python | Python 3.12 |
| Regression Testing | Python 3.13, pytest |
| Network Scope | Localhost only |
Both Marimo versions were deployed in separate Docker environments.
The research was performed on locally controlled systems.
A local experiment was conducted against the vulnerable terminal WebSocket endpoint without supplying authentication credentials.
The recorded experiment produced server-side command output inside the vulnerable Docker container.
Observed execution context:
uid=0(root) gid=0(root) groups=0(root)
Additional observations identified the container's hostname and working directory.
These findings are consistent with successful reproduction of the reported pre-authentication RCE vulnerability in the isolated lab.
The observed root privileges were limited to the container execution environment. They do not demonstrate privilege escalation or compromise of the Windows host.
Experimental evidence:

A manual unauthenticated connection attempt was performed against the patched terminal WebSocket endpoint.
Observed result:
WebSocketBadStatusException
Handshake status 403 Forbidden
The server rejected the connection during the WebSocket handshake.
Experimental evidence:

Two official Marimo authentication regression tests were executed against the Marimo 0.23.0 source code.
| Security Test | Result |
|---|---|
test_terminal_ws_unauthorized | PASSED |
test_terminal_ws_wrong_token | PASSED |
Pytest summary:
2 passed
34 deselected
These tests validate expected authentication-rejection behavior in the test environment.
The automated tests used Starlette's TestClient and were run separately from the Docker-based manual verification.
Evidence:

The affected Marimo 0.20.4 terminal WebSocket endpoint lacked the authentication validation introduced by the official security patch.
The patch adds an authentication check before allowing terminal WebSocket processing when authentication is enabled.
The research examined:
terminal.py.test_terminal.py.Official Patch: Marimo PR #9098
| Document | Description |
|---|---|
| Marimo Overview | Application and vulnerability background |
| Root Cause Analysis | Missing authentication validation |
| WebSocket Flow Analysis | Connection flow diagrams |
| Patch Diff Analysis | Official security patch analysis |
| Security Validation | Manual experiments and regression testing |
| Security Research Report | Consolidated technical findings |
| Mitigation and Recommendations | Remediation and defensive measures |
The recommended remediation is to upgrade affected Marimo installations to version 0.23.0 or a newer maintained release.
Additional defensive recommendations include:
See mitigation.md for details.
This project was conducted for educational and authorized security research.
Testing was limited to isolated localhost environments.
The vulnerable-version experimental results were recorded locally and have not been independently reproduced by a separate researcher.
The research did not demonstrate host operating-system compromise or privilege escalation beyond the container process's existing privileges.
Only two selected official regression tests were executed. The full Marimo test suite was not run.
Research focus: Vulnerability analysis, controlled experimental validation, WebSocket authentication, source-code review, and security patch verification.