GHSA-6qr9-g2xw-cw92

Suggest an improvement
Source
https://github.com/advisories/GHSA-6qr9-g2xw-cw92
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-6qr9-g2xw-cw92/GHSA-6qr9-g2xw-cw92.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6qr9-g2xw-cw92
Aliases
Published
2026-02-19T22:04:39Z
Modified
2026-02-23T19:26:21Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Dagu affected by unauthenticated RCE via inline DAG spec in default configuration
Details

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

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.

Database specific
{
    "cwe_ids":  [
        "CWE-306"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-02-19T22:04:39Z",
    "nvd_published_at":  null,
    "severity":  "CRITICAL"
}
References

Affected packages

Go / github.com/dagu-org/dagu

Package

Name
github.com/dagu-org/dagu
View open source insights on deps.dev
Purl
pkg:golang/github.com/dagu-org/dagu

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Last Affected
1.30.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-6qr9-g2xw-cw92/GHSA-6qr9-g2xw-cw92.json"