Kestrel
대시보드로 돌아가기
CVE-2026-53649CRITICAL· 9.6GHSA대응게시일: 2026. 07. 08.수정일: 2026. 07. 08.

Joro: Unauthenticated Cross-Origin Plugin Upload Leads to RCE

위협 신호 · CVSS · EPSS · KEV

시급 검토· 이론 심각도 Critical
CVSS
9.6critical

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한14일 이내CISA SSVC 기준

2주 이내 패치 — 우선 조치 대상

완전 장악외부 노출· KEV 미등재 · 자동화 어려움 · 완전 장악 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한불필요
사용자 상호작용필요
범위변경
영향
기밀성 영향높음
무결성 영향높음
가용성 영향높음
버전별 점수
CVSS 3.19.6CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

상세 설명

Unauthenticated Cross-Origin Plugin Upload Leads to RCE (Joro ≤ v1.1.0)

Severity: Critical
CVSS v3.1: 9.6 (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H)
Affected versions: Joro ≤ v1.1.0, proxy mode (default), Linux/macOS
Reporter: cstover
Date: 2026-05-27


Summary

Joro's default proxy mode (in versions <= 1.1.0) exposes a local API on 127.0.0.1:9090 that performs no authentication and applies a wildcard CORS policy. Because plugin uploads use the CORS-safelisted multipart/form-data content type, cross-origin JavaScript on any page the operator visits can reach privileged endpoints - including uploading a native plugin and triggering a restart - directly through the operator's browser, with no preflight or credentials. Since plugins execute on load, this yields unauthenticated remote code execution as the operator's user from a single page visit.


Root Cause

Three weaknesses combined into the exploit chain.

1. No authentication in proxy mode.
internal/api/server.go applied AuthMiddleware only when listenerMode was true. In the default proxy mode every API endpoint — including plugin upload and system restart — accepted requests without any token, cookie, or credential.

2. Permissive CORS with an insufficient protection assumption.
corsMiddleware set Access-Control-Allow-Origin: * unconditionally on all responses. SECURITY.md documented this as an intentional tradeoff on the basis that proxy mode binds to 127.0.0.1, which the document states "limits exposure to the local machine."

That assumption was incorrect. multipart/form-data is a CORS-safelisted Content-Type, so cross-origin JavaScript can POST files to the Joro API without triggering a preflight request — the browser allows it. Any web page the operator visited reached the localhost API through their browser without restriction. The localhost bind provided no protection against browser-mediated requests.

3. Plugin init() executed on plugin.Open() before symbol lookup.
internal/plugins/loader.go called plugin.Open(), which ran the plugin's init() functions before any symbol lookup occurred. A plugin with no exports still executed its payload the moment Joro restarted.


Attack Chain

  1. The operator visits an attacker-controlled page in Firefox on their machine.
  2. JavaScript on the page fetches pwn.so from the attacker's server (same-origin, no CORS issue).
  3. JavaScript POSTs pwn.so to http://127.0.0.1:9090/api/v1/plugins/upload as multipart/form-data. Joro accepts it — no auth, no preflight.
  4. JavaScript POSTs to http://127.0.0.1:9090/api/v1/system/restart. Joro re-executes.
  5. On restart, plugin.Open("pwn.so") calls init(), which opens a goroutine and dials back to the attacker's listener.
  6. An interactive /bin/bash -i shell is obtained as the operator's user.

The plugin ABI matches without any access to the operator's machine. The same public v1.1.0 release tarball is downloaded and Joro's own --build-plugin feature is used, which reads runtime/debug.BuildInfo from the release binary and forwards every ABI-relevant flag. One .so works against every operator running that release.


Impact

Unauthenticated, remote, browser-mediated code execution as the operator's user. Because the exploit pivots through the operator's browser to the loopback-bound API, the network bind offers no protection, and a single ABI-matched plugin works against every operator running the affected release.

Fix

The chain is broken at multiple layers. Cross-origin browser access to the proxy-mode API is eliminated, the API is restricted to same-origin requests targeting a loopback host, and the UI/API is bound to loopback only.

1. Removed the wildcard CORS header and gated the proxy-mode API behind a same-origin guard

corsMiddleware (which set Access-Control-Allow-Origin: * on every response) was deleted, and proxy mode now wraps the API in originGuard instead. (internal/api/server.go, commit 5c0ca35)

text
1 var handler http.Handler = mux
2 if s.listenerMode {
3+ // Listener/teamserver: bearer-token auth.
4 handler = team.AuthMiddleware(s.teamToken, handler)
5+} else {
6+ // Proxy mode: restrict the API to same-origin browser requests.
7+ handler = originGuard(uiBind, handler)
8 }
9-handler = corsMiddleware(handler)
text
1-// corsMiddleware adds permissive CORS headers for dev usage.
2-func corsMiddleware(next http.Handler) http.Handler {
3- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
4- w.Header().Set("Access-Control-Allow-Origin", "*")
5- w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
6- w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Joro-Nickname")
7- if r.Method == http.MethodOptions {
8- w.WriteHeader(http.StatusNoContent)
9- return
10- }
11- next.ServeHTTP(w, r)
12- })
13-}

2. Same-origin enforcement via Sec-Fetch-Site + Origin/Host

originGuard rejects state-changing requests (and the /ws upgrade) whose Sec-Fetch-Site indicates a cross-origin initiator or whose Origin host does not match the request Host. Non-browser local tooling (no browser headers) is still allowed. (internal/api/originguard.go, commit 5c0ca35)

text
1func isMutating(method string) bool {
2 switch method {
3 case http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch:
4 return true
5 default:
6 return false
7 }
8}
9
10func sameOrigin(r *http.Request) bool {
11 switch r.Header.Get("Sec-Fetch-Site") {
12 case "", "same-origin", "none":
13 // Same-origin, a direct navigation, or a non-browser client.
14 default: // "cross-site", "same-site"
15 return false
16 }
17 if origin := r.Header.Get("Origin"); origin != "" {
18 if origin == "null" {
19 return false // opaque/sandboxed cross-origin context
20 }
21 u, err := url.Parse(origin)
22 if err != nil || !strings.EqualFold(reqHostname(u.Host), reqHostname(r.Host)) {
23 return false
24 }
25 }
26 return true
27}

3. Tightened the WebSocket origin check

The WebSocket upgrader previously accepted every origin (CheckOrigin: return true). It now rejects cross-origin handshakes while still permitting non-browser clients. (internal/api/ws.go, commit 5c0ca35)

text
1var upgrader = websocket.Upgrader{
2- CheckOrigin: func(r *http.Request) bool { return true },
3+ CheckOrigin: func(r *http.Request) bool {
4+ origin := r.Header.Get("Origin")
5+ if origin == "" {
6+ return true
7+ }
8+ if origin == "null" {
9+ return false
10+ }
11+ u, err := url.Parse(origin)
12+ if err != nil {
13+ return false
14+ }
15+ return strings.EqualFold(reqHostname(u.Host), reqHostname(r.Host))
16+ },
17 }

4. Bound the proxy-mode UI/API to loopback and removed the wildcard host exception

The same-origin check alone can be defeated by DNS rebinding under a wildcard bind, because a rebound host (e.g. attacker.com) carries consistent Origin/Host/Sec-Fetch-Site headers. Two coordinated changes close this: the proxy-mode UI/API now binds to 127.0.0.1 regardless of --bind (which governs only the proxy port), and hostAllowed no longer has a wildcard exception, so the host must be loopback or the exact bind address. (internal/api/server.go and internal/api/originguard.go, commit 871936f)

text
1+// In proxy mode the UI/API binds to loopback only: --bind governs the proxy
2+// port, and remote collaboration is listener/teamserver mode (bearer-token auth).
3+uiBind := s.cfg.BindAddr
4+if !s.listenerMode {
5+ uiBind = "127.0.0.1"
6+}
7+
8 var handler http.Handler = mux
9 ...
10 s.srv = &http.Server{
11- Addr: fmt.Sprintf("%s:%d", s.cfg.BindAddr, s.cfg.UIPort),
12+ Addr: fmt.Sprintf("%s:%d", uiBind, s.cfg.UIPort),
text
1 func hostAllowed(reqHost, bindAddr string) bool {
2 h := reqHostname(reqHost)
3 if h == "" {
4 return false
5 }
6 switch h {
7 case "localhost", "127.0.0.1", "::1":
8 return true
9 }
10- switch bindAddr {
11- case "", "0.0.0.0", "::":
12- return true
13- }
14 return strings.EqualFold(h, reqHostname(bindAddr))
15 }

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.