# CVE-2026-27598: Dagu: Path traversal in DAG creation allows arbitrary YAML file write outside DAGs directory

> An authenticated user can exploit path traversal in the DAG creation API to write arbitrary files, potentially leading to remote code execution.

- **Severity:** High 7.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 25 Feb 2026
- **Updated:** 26 Feb 2026
- **Also known as:** GHSA-6v48-fcq6-ff23, GO-2026-4542

## What is CVE-2026-27598?

CVE-2026-27598 is a high-severity path traversal vulnerability in dagu-org dagu, published on 25 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-27598?

3 open source packages ship an affected version, including github.com/dagu-org/dagu. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/dagu-org/dagu` | Go | All versions | None |
| `github.com/dagu-org/dagu` | Go | All versions to 1.16.7 | None |
| `github.com/dagu-org/dagu` | Go | All versions to 1.16.7 | None |

Products: Dagu Dagu.

## How do I fix CVE-2026-27598?

Apply the vendor's patch.

## Is CVE-2026-27598 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27598 exists.

## Other vulnerabilities in dagu-org dagu

- [CVE-2026-31886](https://insights.sbomify.com/CVE-2026-31886/): Dagu has a Path Traversal via `dagRunId` in Inline DAG Execution (critical 9.1)
- [CVE-2026-33344](https://insights.sbomify.com/CVE-2026-33344/): Dagu has an incomplete fix for CVE-2026-27598: path traversal via %2F-encoded slashes in locateDAG (high 8.1)
- [CVE-2026-31882](https://insights.sbomify.com/CVE-2026-31882/): Dagu SSE Authentication Bypass in Basic Auth Mode (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-27598 and fix it if it is affected.

What it is: CVE-2026-27598 is a high-severity path traversal vulnerability in dagu-org dagu, published on 25 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27598 exists.

Affected packages and fixed versions:
- github.com/dagu-org/dagu (Go): affected all versions; no fix listed
- github.com/dagu-org/dagu (Go): affected all versions up to 1.16.7; no fix listed
- github.com/dagu-org/dagu (Go): affected all versions up to 1.16.7; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-27598/ (Markdown: https://insights.sbomify.com/CVE-2026-27598/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-27598
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-27598
- OSV: https://osv.dev/vulnerability/CVE-2026-27598

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-27598/
Summaries are generated and may contain mistakes; the official description above is the record.
