CVE-2026-27598: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dagu-org dagu
Dagu is a workflow engine with a built-in Web user interface. In versions up to and including 1.16.7, the `CreateNewDAG` API endpoint (`POST /api/v1/dags`) does not validate the DAG name before passing it to the file store. An authenticated user with DAG write permissions can write arbitrary YAML files anywhere on the filesystem (limited by the process permissions). Since dagu executes DAG files as shell commands, writing a malicious DAG to the DAGs directory of another instance or overwriting config files can lead to remote code execution. Commit e2ed589105d79273e4e6ac8eb31525f765bb3ce4 fixes the issue.
AI Analysis
Technical Summary
CVE-2026-27598 is a path traversal vulnerability categorized under CWE-22 affecting dagu, a workflow engine with a built-in web user interface. In dagu versions up to and including 1.16.7, the CreateNewDAG API endpoint (POST /api/v1/dags) does not properly validate the DAG name input before passing it to the file storage system. This lack of validation allows an authenticated user with DAG write permissions to craft DAG names containing path traversal sequences (e.g., ../) that enable writing arbitrary YAML files to any location on the filesystem accessible by the dagu process. Since dagu executes DAG files as shell commands, an attacker can leverage this to write malicious DAG files into the DAG directory of another dagu instance or overwrite critical configuration files, leading to remote code execution (RCE). The vulnerability requires authentication and DAG write privileges but does not require user interaction or elevated privileges beyond those permissions. The issue was addressed in commit e2ed589105d79273e4e6ac8eb31525f765bb3ce4, which adds proper validation to restrict DAG names and prevent path traversal. The CVSS 4.0 base score is 7.1 (high), reflecting the network attack vector, low attack complexity, no privileges required beyond DAG write, and high impact on integrity via RCE. No known exploits are reported in the wild yet. This vulnerability highlights the risk of insufficient input validation in workflow automation tools that execute user-supplied files.
Potential Impact
The vulnerability allows attackers with DAG write permissions to write arbitrary files anywhere on the filesystem accessible to the dagu process, potentially overwriting critical configuration files or injecting malicious DAG files that are executed as shell commands. This can lead to remote code execution, compromising the confidentiality, integrity, and availability of affected systems. Organizations using dagu for workflow automation may face complete system compromise, data breaches, or disruption of automated processes. Multi-tenant environments or instances exposed to a broader user base are at higher risk. The requirement for authentication and DAG write permissions limits the attack surface but does not eliminate it, especially if credentials are compromised or if insider threats exist. The ability to execute arbitrary commands can facilitate lateral movement, privilege escalation, and persistent access within affected networks.
Mitigation Recommendations
1. Upgrade dagu to version 1.16.8 or later where the vulnerability is fixed. 2. Restrict DAG write permissions strictly to trusted users and service accounts. 3. Implement strong authentication and access controls to prevent unauthorized access to the CreateNewDAG API endpoint. 4. Monitor and audit DAG creation and modification activities for suspicious patterns, especially unusual DAG names containing path traversal sequences. 5. Employ filesystem permissions and containerization to limit the dagu process's filesystem access, reducing the impact of arbitrary file writes. 6. Use network segmentation and firewall rules to restrict access to the dagu web interface and API. 7. Conduct regular security assessments and code reviews for custom workflow scripts to detect malicious modifications. 8. Consider deploying runtime application self-protection (RASP) or endpoint detection and response (EDR) solutions to detect anomalous command executions triggered by dagu.
Affected Countries
United States, Germany, United Kingdom, France, Japan, South Korea, India, Canada, Australia, Netherlands
CVE-2026-27598: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dagu-org dagu
Description
Dagu is a workflow engine with a built-in Web user interface. In versions up to and including 1.16.7, the `CreateNewDAG` API endpoint (`POST /api/v1/dags`) does not validate the DAG name before passing it to the file store. An authenticated user with DAG write permissions can write arbitrary YAML files anywhere on the filesystem (limited by the process permissions). Since dagu executes DAG files as shell commands, writing a malicious DAG to the DAGs directory of another instance or overwriting config files can lead to remote code execution. Commit e2ed589105d79273e4e6ac8eb31525f765bb3ce4 fixes the issue.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-27598 is a path traversal vulnerability categorized under CWE-22 affecting dagu, a workflow engine with a built-in web user interface. In dagu versions up to and including 1.16.7, the CreateNewDAG API endpoint (POST /api/v1/dags) does not properly validate the DAG name input before passing it to the file storage system. This lack of validation allows an authenticated user with DAG write permissions to craft DAG names containing path traversal sequences (e.g., ../) that enable writing arbitrary YAML files to any location on the filesystem accessible by the dagu process. Since dagu executes DAG files as shell commands, an attacker can leverage this to write malicious DAG files into the DAG directory of another dagu instance or overwrite critical configuration files, leading to remote code execution (RCE). The vulnerability requires authentication and DAG write privileges but does not require user interaction or elevated privileges beyond those permissions. The issue was addressed in commit e2ed589105d79273e4e6ac8eb31525f765bb3ce4, which adds proper validation to restrict DAG names and prevent path traversal. The CVSS 4.0 base score is 7.1 (high), reflecting the network attack vector, low attack complexity, no privileges required beyond DAG write, and high impact on integrity via RCE. No known exploits are reported in the wild yet. This vulnerability highlights the risk of insufficient input validation in workflow automation tools that execute user-supplied files.
Potential Impact
The vulnerability allows attackers with DAG write permissions to write arbitrary files anywhere on the filesystem accessible to the dagu process, potentially overwriting critical configuration files or injecting malicious DAG files that are executed as shell commands. This can lead to remote code execution, compromising the confidentiality, integrity, and availability of affected systems. Organizations using dagu for workflow automation may face complete system compromise, data breaches, or disruption of automated processes. Multi-tenant environments or instances exposed to a broader user base are at higher risk. The requirement for authentication and DAG write permissions limits the attack surface but does not eliminate it, especially if credentials are compromised or if insider threats exist. The ability to execute arbitrary commands can facilitate lateral movement, privilege escalation, and persistent access within affected networks.
Mitigation Recommendations
1. Upgrade dagu to version 1.16.8 or later where the vulnerability is fixed. 2. Restrict DAG write permissions strictly to trusted users and service accounts. 3. Implement strong authentication and access controls to prevent unauthorized access to the CreateNewDAG API endpoint. 4. Monitor and audit DAG creation and modification activities for suspicious patterns, especially unusual DAG names containing path traversal sequences. 5. Employ filesystem permissions and containerization to limit the dagu process's filesystem access, reducing the impact of arbitrary file writes. 6. Use network segmentation and firewall rules to restrict access to the dagu web interface and API. 7. Conduct regular security assessments and code reviews for custom workflow scripts to detect malicious modifications. 8. Consider deploying runtime application self-protection (RASP) or endpoint detection and response (EDR) solutions to detect anomalous command executions triggered by dagu.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-20T19:43:14.602Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 699e48bfb7ef31ef0b85c3ec
Added to database: 2/25/2026, 12:56:31 AM
Last enriched: 3/4/2026, 7:05:15 PM
Last updated: 4/11/2026, 4:03:57 AM
Views: 96
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.