Skip to content

AAK-MCP-DAGU-CVE-2026-102943-001: Dagu 2.7.0 to 2.10.7: the MCP dagu_read dag_spec target reads YAML files outside the DAG directories

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/container_image_pins.py, agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
DaguMcpDagSpecPathTraversal

What it detects

Dagu (dagucloud/dagu), a self-hosted workflow engine with a built-in MCP server, ships as the image ghcr.io/dagucloud/dagu and through the npm launcher @dagucloud/dagu, which runs the binary of its own version from a platform package. Before 2.11.0 the MCP dagu_read tool's dag_spec target called the DAG specification API in process, past the HTTP middleware that checks the file name, and the store's resolver returned an absolute or traversing path as given, so a holder of a viewer-role API key could read any .yaml or .yml file the Dagu process can read, across workspaces (CVE-2026-102943, CVSS 3.1 6.5, CWE-22, GHSA-5m6c-38r8-5w76). Checked in the source at each tag: the MCP server (internal/service/mcp/server.go, #2158) is absent at v2.6.10 and ships in v2.7.0, whose getDAGSpec hands the name to GetDAGSpec; at v2.10.7 locateDAG still returns a name containing a separator unchecked; v2.11.0 (c15c5406, #2424) resolves every name inside a configured DAG directory.

How to fix

Upgrade Dagu to 2.11.0 or later (the image, the npm launcher or the binary) and pin it. Until then do not give MCP clients API keys on a server whose host holds YAML files they should not read.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-DAGU-CVE-2026-102943-001

Limitations

Reports ghcr.io/dagucloud/dagu tags from 2.7.0 below 2.11.0, the -alpine and -dev builds included, in compose files, Kubernetes manifests, Helm values, Dockerfiles and MCP configs, and an npm reference to @dagucloud/dagu in that range that states a version: a package.json or lockfile entry, or the package in an MCP config or a package.json script, reporting a range that admits an affected version. Releases below 2.7.0 predate the MCP server and are not reported, nor is npm's unscoped dagu, whose last release is 1.22.10. latest was the 2.26.0 build on 2026-11-11, so an untagged image and an unpinned launcher are not reported. It reads the version, not whether any MCP client holds an API key. A binary installed by script, Homebrew or Scoop states no version AAK reads, and this rule reads no go.mod. Mirrors under another registry are not matched, and commented-out lines are skipped. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-DAGU-CVE-2026-102943-001.md: the page then shows that text, with the registry reference appended under it.