/

CVE-2026-126752

Severity:

CRITICAL RISK

(9.8)

Missing Authentication (CWE-306) in Dagu DAG Runs API

CVE-2026-126752

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dagu can run OS commands from inline workflow specifications submitted to the /api/v2/dag-runs endpoint. When authentication is disabled—as it is by default in the affected configurations—an unauthenticated attacker who can reach the endpoint may be able to trigger remote code execution.

Affected context

The issue affects Dagu deployments in the described version range, from 1.23.0 before 2.0.0, when auth.mode is left at its default value of none. The relevant attack surface is the /api/v2/dag-runs endpoint, which accepts POST requests containing inline DAG specifications. Risk depends on whether the endpoint is reachable by untrusted parties and whether submitted steps are executed.

Exploit preconditions

  • Attack surface: The Dagu /api/v2/dag-runs API must be reachable by the attacker.
  • Required access: No credentials are required when authentication is disabled.
  • Trigger point: A POST request to /api/v2/dag-runs with an inline DAG specification.
  • Why exploitation is possible: The service can execute shell commands defined in submitted DAG steps without requiring authentication.

Why this happens

The underlying issue is missing authentication on an API operation that can initiate command execution. This maps to CWE-306: Missing Authentication for Critical Function: a security-sensitive function is available without first verifying the caller's identity. A default configuration that leaves authentication disabled can expose this function to unauthenticated users when the API is network-accessible.

Potential impact

  • An attacker may execute arbitrary OS commands in the Dagu runtime environment.
  • The application or its data could be compromised.
  • A compromised runtime could be used to access other systems or resources available to its service account.
  • Disruption of DAG execution or other service operations could occur.

General mitigation guidance

Defensive approaches focus on requiring identity verification before exposing functions that execute workflows.

  • Configure authentication as a secure-by-default requirement for API access.
  • Restrict network access to the DAG-run endpoint to trusted clients and networks.
  • Treat submitted DAG specifications as untrusted; limit or disable inline specifications where they are not needed.
  • Run Dagu with least-privilege OS and service-account permissions, and isolate workflow execution from sensitive resources.
  • Apply authorization checks that limit which users or services can submit and run DAGs.

How teams detect issues like this

  • Review configuration and deployment policies for instances where auth.mode is unset or set to none.
  • Inspect API access logs for unauthenticated POST requests to /api/v2/dag-runs, especially requests containing inline specifications.
  • Use static analysis and code review to verify that authentication and authorization checks cover workflow-execution routes.
  • Enforce deployment policies that require authentication and restrict network exposure for command-execution interfaces.
  • Automated security reviews can help identify sensitive endpoints that lack access-control checks.

Sources

SourceLink
github.comgithub.com/dagucloud/dagu/commit/c0e7cf7e1cfc3a52af8a9fb2da1ca911a9958649
github.comgithub.com/dagucloud/dagu/pull/1688
github.comgithub.com/dagucloud/dagu/security/advisories/GHSA-6qr9-g2xw-cw92
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/other/dagu-rce.yaml
vulncheck.comvulncheck.com/advisories/dagu-1.23.0-2.0.0-unauthenticated-rce-via-api-v2-dag-runs
vulncheck.comvulncheck.com/advisories/dagu-1.23.0-before-2.0.0-unauthenticated-rce-via-api-v2-dag-runs

Frequently asked

questions

Yes, if the API is reachable over a network and authentication is disabled, an unauthenticated attacker may submit a DAG that runs commands.

Not when auth.mode is none. Network reachability to the endpoint is still required.

Require authentication and authorization before accepting workflow-run requests, and limit who can submit executable DAG specifications.

Use secure-by-default access controls, restrict exposure of execution interfaces, and review sensitive routes for consistent authentication and authorization enforcement.

Find out what's already
exploitable in your codebase.