{"id":"GHSA-w7j5-j98m-w679","aliases":["GHSA-w7j5-j98m-w679"],"related":[],"kind":"vulnerability","state":"published","title":"OpenClaw has multiple E2E/test Dockerfiles that run all processes as root","summary":"Three Dockerfiles in scripts/docker/ and scripts/e2e/ lack a USER directive, meaning all processes run as uid 0 (root). If any process is compromised, the attacker has root inside the container, making container breakout significantly easier.\n**Partial fix (2026-02-08):** Commit 28e1a65e added USER sandbox to Dockerfile.sandbox and Dockerfile.sandbox-browser. The E2E/test Dockerfiles listed below remain unpatched.\n\n**Affected components:**\n- scripts/e2e/Dockerfile\n- scripts/e2e/Dockerfile.qr-import\n- scripts/docker/install-sh-e2e/Dockerfile\n- scripts/docker/install-sh-nonroot/Dockerfile (runs as app but with NOPASSWD sudo — see related advisory)\n\n**Technical Reproduction:**\n1. Open each Dockerfile listed above and search for a USER directive — none found.\n2. Run any of these containers: docker run --rm -it <image> id\n3. Observe: returns uid=0(root).\n\n**Demonstrated Impact:**\n- Root inside the container enables kernel exploit attempts, volume mount abuse, and privileged syscall access.\n- Test images share the same base (node:22-bookworm) as production, creating risk of accidental deployment of root-running images.\n\n**Environment:** Base images node:22-bookworm and node:22-bookworm-slim default to root. Dockerfile.sandbox and Dockerfile.sandbox-browser were remediated in commit 28e1a65e; only the E2E/test images listed above remain affected.\n\n**Remediation:** Add a USER directive before CMD/ENTRYPOINT in each remaining Dockerfile:\n  RUN useradd --create-home --shell /bin/bash appuser\n  USER appuser","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Three Dockerfiles in scripts/docker/ and scripts/e2e/ lack a USER directive, meaning all processes run as uid 0 (root). If any process is compromised, the attacker has root inside the container, making container breakout significantly easier.\n**Partial fix (2026-02-08):** Commit 28e1a65e added USER sandbox to Dockerfile.sandbox and Dockerfile.sandbox-browser. The E2E/test Dockerfiles listed below remain unpatched.\n\n**Affected components:**\n- scripts/e2e/Dockerfile\n- scripts/e2e/Dockerfile.qr-import\n- scripts/docker/install-sh-e2e/Dockerfile\n- scripts/docker/install-sh-nonroot/Dockerfile (runs as app but with NOPASSWD sudo — see related advisory)\n\n**Technical Reproduction:**\n1. Open each Dockerfile listed above and search for a USER directive — none found.\n2. Run any of these containers: docker run --rm -it <image> id\n3. Observe: returns uid=0(root).\n\n**Demonstrated Impact:**\n- Root inside the container enables kernel exploit attempts, volume mount abuse, and privileged syscall access.\n- Test images share the same base (node:22-bookworm) as production, creating risk of accidental deployment of root-running images.\n\n**Environment:** Base images node:22-bookworm and node:22-bookworm-slim default to root. Dockerfile.sandbox and Dockerfile.sandbox-browser were remediated in commit 28e1a65e; only the E2E/test images listed above remain affected.\n\n**Remediation:** Add a USER directive before CMD/ENTRYPOINT in each remaining Dockerfile:\n  RUN useradd --create-home --shell /bin/bash appuser\n  USER appuser","format":"markdown","source":"ghsa"}],"published":"2026-03-03T22:25:13.000Z","modified":"2026-03-04T15:17:33.992Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H","rating":"HIGH"}],"cwes":["CWE-250"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2026.2.21"}],"ecosystem":"npm","package":"openclaw","purl":"pkg:npm/openclaw","source":"ghsa"}],"references":[{"url":"https://github.com/openclaw/openclaw/security/advisories/GHSA-w7j5-j98m-w679","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/openclaw/openclaw/commit/28e1a65ebc580f07533966f5693f4df0a18d7085","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/openclaw/openclaw","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w7j5-j98m-w679","url":"https://github.com/advisories/GHSA-w7j5-j98m-w679","licence":"CC-BY-4.0","modified":"2026-03-04T15:17:33.992Z"}],"updatedAt":"2026-11-25T22:56:46.795Z"}