Skip to content

fix: harden /ws_debug exposure (origin allowlist + gate route on enableDebugger)#602

Merged
rubenfiszel merged 2 commits into
mainfrom
security/debugger-harden-ws-debug
Jun 28, 2026
Merged

fix: harden /ws_debug exposure (origin allowlist + gate route on enableDebugger)#602
rubenfiszel merged 2 commits into
mainfrom
security/debugger-harden-ws-debug

Conversation

@rubenfiszel

Copy link
Copy Markdown
Contributor

Summary

Companion to windmill-labs/windmill#9829 (the OSS fix for the unauthenticated DAP debugger).

The chart already defaults requireSignedDebugRequests: true, so the reported exposure on Windmill-hosted subdomains was not a missing-signing misconfig — it worked despite signing being on, via the program-mode launch bypass fixed in the OSS PR (a program: <path> launch skipped JWT verification entirely and read+executed an arbitrary server-side file). The debugger WS handshake also performed no Origin check (CSWSH).

This PR adds the chart-side hardening that pairs with the OSS change.

Changes

  • debugAllowedOrigins value → DEBUG_ALLOWED_ORIGINS env on the windmill-extra container. Opt-in cross-origin (CSWSH) allowlist; the env var is only emitted when the value is non-empty, so default behavior is unchanged.
  • Gate the /ws_debug/ ingress and httproute paths on enableDebugger. Previously the route was published to the gateway whenever extraReplicas > 0, even with the debugger disabled (where it could only 502). Now the path is only routed when the debugger is actually running — strictly less attack surface, no functional change for the default (enableDebugger: true).
  • Strengthen the requireSignedDebugRequests doc comment to warn against disabling it on internet-reachable deployments.
  • Bump chart version 4.0.174 → 4.0.175; regenerate README values block + table.

The debugger remains enabled by default — enableDebugger: true is unchanged. This PR only stops publishing the /ws_debug/ route when the debugger is off.

Test plan

  • helm lint charts/windmill passes.
  • Default render (extraReplicas=1): /ws_debug/ route present (debugger on, unchanged).
  • enableDebugger=false: /ws_debug/ route absent in both ingress and httproute.
  • DEBUG_ALLOWED_ORIGINS env absent when debugAllowedOrigins unset; present with the configured value when set.
  • Reviewer: confirm desired default for debugAllowedOrigins (left empty = signed-token verification only, per OSS default).

rubenfiszel and others added 2 commits June 28, 2026 09:43
… enableDebugger)

Companion to windmill-labs/windmill#9829. The chart already defaults
requireSignedDebugRequests=true, but the debugger WebSocket was still reachable
unauthenticated via the program-mode launch bypass (fixed in the OSS PR) and the
handshake had no Origin check.

- Add windmillExtra.debugAllowedOrigins -> DEBUG_ALLOWED_ORIGINS env (opt-in
  cross-origin/CSWSH allowlist; only emitted when set).
- Gate the /ws_debug/ ingress and httproute paths on enableDebugger so the route
  is not published when the debugger is disabled. Default (enableDebugger=true)
  behavior is unchanged.
- Strengthen the requireSignedDebugRequests doc to warn against disabling it on
  internet-reachable deployments.
- Bump chart version 4.0.174 -> 4.0.175 and regenerate README values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rubenfiszel rubenfiszel marked this pull request as ready for review June 28, 2026 09:50
@rubenfiszel rubenfiszel merged commit c6423db into main Jun 28, 2026
11 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant