Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-31886: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dagu-org dagu

0
Critical
VulnerabilityCVE-2026-31886cvecve-2026-31886cwe-22
Published: Fri Mar 13 2026 (03/13/2026, 19:32:09 UTC)
Source: CVE Database V5
Vendor/Project: dagu-org
Product: dagu

Description

Dagu is a workflow engine with a built-in Web user interface. Prior to 2.2.4, the dagRunId request field accepted by the inline DAG execution endpoints is passed directly into filepath.Join to construct a temporary directory path without any format validation. Go's filepath.Join resolves .. segments lexically, so a caller can supply a value such as ".." to redirect the computed directory outside the intended /tmp/<name>/<id> path. A deferred cleanup function that calls os.RemoveAll on that directory then runs unconditionally when the HTTP handler returns, deleting whatever directory the traversal resolved to. With dagRunId set to "..", the resolved directory is the system temporary directory (/tmp on Linux). On non-root deployments, os.RemoveAll("/tmp") removes all files in /tmp owned by the dagu process user, disrupting every concurrent dagu run that has live temp files. On root or Docker deployments, the call removes the entire contents of /tmp, causing a system-wide denial of service. This vulnerability is fixed in 2.2.4.

AI-Powered Analysis

AILast updated: 03/13/2026, 19:59:06 UTC

Technical Analysis

Dagu is a workflow engine with a web interface that prior to version 2.2.4 contains a critical path traversal vulnerability (CVE-2026-31886) classified under CWE-22. The vulnerability stems from improper validation of the dagRunId request parameter used in inline DAG execution endpoints. This parameter is passed directly into Go's filepath.Join function to construct a temporary directory path. Since filepath.Join resolves '..' segments lexically, an attacker can supply a value such as ".." to traverse outside the intended directory structure (/tmp/<name>/<id>). A deferred cleanup function then calls os.RemoveAll on the resolved path unconditionally when the HTTP handler completes. If dagRunId is "..", the resolved path becomes the system temporary directory (/tmp on Linux). On deployments running as non-root users, os.RemoveAll("/tmp") deletes all files in /tmp owned by the dagu process user, disrupting all concurrent dagu runs relying on temporary files. On root or Docker container deployments, this results in the deletion of the entire /tmp directory contents, causing a system-wide denial of service. The vulnerability requires low attack complexity and no user interaction but does require some privileges (PR:L). The scope is complete as it affects confidentiality, integrity, and availability, primarily availability due to denial of service. The vulnerability was publicly disclosed on March 13, 2026, with a CVSS v3.1 score of 9.1 (critical). The issue is resolved in dagu version 2.2.4.

Potential Impact

The impact of CVE-2026-31886 is significant for organizations using dagu workflow engine versions prior to 2.2.4. Exploitation can lead to widespread denial of service by deleting critical temporary files or the entire /tmp directory, which many Linux-based systems and applications rely on for temporary storage. On non-root deployments, this disrupts all concurrent dagu runs, causing workflow failures and potential data loss in temporary processing. On root or containerized deployments, the deletion of /tmp can affect multiple system services and applications beyond dagu, potentially causing system instability or crashes. This can result in operational downtime, loss of productivity, and increased recovery costs. Although confidentiality and integrity impacts are limited, the availability impact is severe and can affect business continuity. The vulnerability can be exploited remotely with low complexity, increasing the risk of automated or widespread attacks. Organizations running dagu in critical environments, especially those using root or containerized deployments, face elevated risk of system-wide disruption.

Mitigation Recommendations

To mitigate CVE-2026-31886, organizations should immediately upgrade dagu to version 2.2.4 or later, where the vulnerability is fixed. If upgrading is not immediately possible, implement strict input validation and sanitization on the dagRunId parameter to prevent path traversal sequences such as '..'. Employ application-layer filtering or web application firewalls (WAFs) to detect and block malicious requests attempting directory traversal. Run dagu with the least privilege possible, avoiding root or overly permissive container configurations to limit the scope of damage if exploited. Regularly monitor logs for unusual deletion activity or errors related to temporary directories. Implement file system protections such as immutable flags or access control lists (ACLs) on critical directories like /tmp to prevent unauthorized deletions. Finally, conduct thorough testing of workflow engine endpoints to ensure no other parameters allow similar traversal or destructive operations.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-09T21:59:02.686Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69b469392f860ef943905692

Added to database: 3/13/2026, 7:44:57 PM

Last enriched: 3/13/2026, 7:59:06 PM

Last updated: 3/13/2026, 10:24:14 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses