# CVE-2026-31886: Dagu has a Path Traversal via `dagRunId` in Inline DAG Execution

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.46%, higher than 41% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-13T15:40:11.000Z
- Modified: 2026-06-17T10:34:41.853Z
- Also known as: GHSA-m4q3-457p-hh2x, GO-2026-4693
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- dagu-org dagu: < 2.2.4
- github.com/dagu-org/dagu (Go): up to 2.2.4; all versions
- dagu dagu: before 2.2.4

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:H`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:H`
- NVD: CVSS:3.1 7.6 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`

## References

- <https://github.com/dagu-org/dagu/security/advisories/GHSA-m4q3-457p-hh2x> (exploit, advisory, mitigation, vendor-advisory, web)
- <https://github.com/dagu-org/dagu/commit/12c2e5395bd9331d49ca103593edfd0db39c4f38> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-31886> (advisory)
- <https://github.com/dagu-org/dagu> (package)
- <https://pkg.go.dev/vuln/GO-2026-4693> (web)

## Sources

- CVE List: [CVE-2026-31886](https://www.cve.org/CVERecord?id=CVE-2026-31886), CVE Terms of Use, modified 2026-03-13
- GitHub Advisory Database: [GHSA-m4q3-457p-hh2x](https://github.com/advisories/GHSA-m4q3-457p-hh2x), CC-BY-4.0, modified 2026-03-23
- Go Vulnerability Database: [GO-2026-4693](https://pkg.go.dev/vuln/GO-2026-4693), CC-BY-4.0, modified 2026-03-23
- NVD: [CVE-2026-31886](https://nvd.nist.gov/vuln/detail/CVE-2026-31886), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-31886 · Whole record: https://cve.day/CVE-2026-31886.json · Rebuilt by cve.day 2026-11-25T22:59:15.885Z
