Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

GHSA-6qr9-g2xw-cw92

Dagu affected by unauthenticated RCE via inline DAG spec in default configuration
Back to all
CVE

GHSA-6qr9-g2xw-cw92

Dagu affected by unauthenticated RCE via inline DAG spec in default configuration

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 DAGUAUTHMODE configuration — is fully compromised without credentials. An attacker with network access gets OS command execution as the dagu process user.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
-
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://github.com/dagu-org/dagu/security/advisories/GHSA-6qr9-g2xw-cw92, https://github.com/dagu-org/dagu

Severity

9.8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
9.8
EPSS Probability
0%
EPSS Percentile
0%
Introduced Version
0
Fix Available

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading