Dagu has a Path Traversal via `dagRunId` in Inline DAG Execution
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// 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 Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/dagu-org/daguGo | <= 2.2.4 | — |
Affected products
3- ghsa-coords2 versionspkg:golang/github.com/dagu-org/dagupkg:rpm/opensuse/govulncheck-vulndb&distro=openSUSE%20Leap%2015.6
<= 2.2.4+ 1 more
- (no CPE)range: <= 2.2.4
- (no CPE)range: < 0.0.20260317T205859-150000.1.152.1
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-m4q3-457p-hh2xghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-31886ghsaADVISORY
- github.com/dagu-org/dagu/commit/12c2e5395bd9331d49ca103593edfd0db39c4f38ghsax_refsource_MISCWEB
- github.com/dagu-org/dagu/security/advisories/GHSA-m4q3-457p-hh2xghsax_refsource_CONFIRMWEB
- pkg.go.dev/vuln/GO-2026-4693ghsaWEB
News mentions
0No linked articles in our index yet.