openclaw - 💡(How to fix) Fix [Bug]: Docker container starts with --allow-unconfigured, enabling unconfigured gateway deployment [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The issue crosses a documented trust boundary because attacker-controlled input can trigger behavior that the protected component should reserve for authorized callers. This is exploitable vulnerability behavior rather than advisory hardening because the current implementation permits a concrete security property violation.

Impact

Fix Action

Fixed

Code Example

CMD ["node", "openclaw.mjs", "gateway", "--allow-unconfigured"]

---

"allowUnconfigured", // Line 75

---

if (!opts.allowUnconfigured && mode !== "local") {
  // Validation is skipped when allowUnconfigured is true
}

---

command: [
  "node", "dist/index.js", "gateway", "--bind",
  "${OPENCLAW_GATEWAY_BIND:-lan}",  # Defaults to lan (0.0.0.0)
  "--port", "18789",
]
RAW_BUFFERClick to expand / collapse

Severity Assessment

CVSS Assessment

Metricv3.1v4.0
Score7.5 / 10.08.7 / 10.0
SeverityHighHigh
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CalculatorCVSS v3.1 CalculatorCVSS v4.0 Calculator

Threat Model Alignment

Classification: security-specific

The issue crosses a documented trust boundary because attacker-controlled input can trigger behavior that the protected component should reserve for authorized callers. This is exploitable vulnerability behavior rather than advisory hardening because the current implementation permits a concrete security property violation.

Impact

The official OpenClaw Dockerfile defaults to starting the gateway with the --allow-unconfigured flag, which bypasses configuration validation. This allows a gateway to start without auth credentials, proper bind configuration, or required secrets, creating a window where the service may be accessible without intended security controls.

Affected Component

File: openclaw/Dockerfile:249

CMD ["node", "openclaw.mjs", "gateway", "--allow-unconfigured"]

Technical Reproduction

  1. Build the OpenClaw Docker image: docker build -t openclaw:local .
  2. Run the container without any configuration: docker run -p 18789:18789 openclaw:local
  3. Observe that the gateway starts and listens on all interfaces (bind=lan due to docker-compose.yml default)
  4. The gateway is accessible without any auth token or password configured

Demonstrated Impact

The --allow-unconfigured flag is documented in src/cli/gateway-cli/run.ts as:

"allowUnconfigured", // Line 75

When this flag is set, the startup validation at src/cli/gateway-cli/run.ts:318 is bypassed:

if (!opts.allowUnconfigured && mode !== "local") {
  // Validation is skipped when allowUnconfigured is true
}

The docker-compose.yml further compounds this by defaulting to gateway.bind=lan:

command: [
  "node", "dist/index.js", "gateway", "--bind",
  "${OPENCLAW_GATEWAY_BIND:-lan}",  # Defaults to lan (0.0.0.0)
  "--port", "18789",
]

This combination means a Docker deployment can expose an unconfigured gateway to all network interfaces.

Environment

Tested on: OpenClaw v2026.5.12 (published 2026-05-14T18:28:04Z) on main. Docker environment with default docker-compose.yml configuration

Remediation Advice

Remove --allow-unconfigured from the Dockerfile CMD, or document this as an intentional break-glass default that operators must override in production. Add startup validation that detects if auth credentials are missing when bind is non-loopback and fails closed rather than starting.

<!-- submission-marker:CD-oan-docker-allow-unconfigured -->

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING