# GHSA-6qr9-g2xw-cw92: Dagu affected by unauthenticated RCE via inline DAG spec in default configuration

> Unauthenticated attackers can execute arbitrary OS commands on Dagu instances via the API due to disabled authentication in the default configuration.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 19 Feb 2026
- **Also known as:** GO-2026-4527

## What is GHSA-6qr9-g2xw-cw92?

GHSA-6qr9-g2xw-cw92 is a command injection vulnerability in github.com/dagu-org/dagu, published on 19 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Summary
Dagu'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.

### Details
`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.

The `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.

### PoC
```bash
curl -s -X POST http://TARGET:8080/api/v2/dag-runs \
  -H "Content-Type: application/json" \
  -d '{"name":"poc","spec":"steps:\n  - name: rce\n    command: id > /tmp/pwned\n"}'
# Response: {"dagRunId":"<uuid>"}
# /tmp/pwned contains: uid=1000(dagu) gid=1000(dagu)
```
Confirmed on `ghcr.io/dagu-org/dagu:latest` with no configuration changes.

### Impact
Every 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.

## Which versions are affected by GHSA-6qr9-g2xw-cw92?

3 open source packages ship an affected version, including github.com/dagu-org/dagu.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/dagu-org/dagu` | Go | All versions | None |
| `github.com/dagu-org/dagu` | Go | All versions to 1.30.3 | None |
| `github.com/dagu-org/dagu` | Go | All versions to 1.30.3 | None |

## How do I fix GHSA-6qr9-g2xw-cw92?

No fix has been published for GHSA-6qr9-g2xw-cw92 yet. Limit exposure of the affected software until one is available.

## Is GHSA-6qr9-g2xw-cw92 being exploited?

There is no known exploitation of GHSA-6qr9-g2xw-cw92 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-6qr9-g2xw-cw92 and fix it if it is affected.

What it is: GHSA-6qr9-g2xw-cw92 is a command injection vulnerability in github.com/dagu-org/dagu, published on 19 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-6qr9-g2xw-cw92 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/dagu-org/dagu (Go): affected all versions; no fix listed
- github.com/dagu-org/dagu (Go): affected all versions up to 1.30.3; no fix listed
- github.com/dagu-org/dagu (Go): affected all versions up to 1.30.3; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-6qr9-g2xw-cw92/ (Markdown: https://insights.sbomify.com/GHSA-6qr9-g2xw-cw92/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-6qr9-g2xw-cw92

---
From sbomify Insights: https://insights.sbomify.com/GHSA-6qr9-g2xw-cw92/
Summaries are generated and may contain mistakes; the official description above is the record.
