Description
The pocketflow-coding-agent cookbook example in The-Pocket/PocketFlow implements a `_path(workdir, p)` helper as a thin os.path.join(workdir, p) wrapper with no canonicalization or containment check, used unguarded by the ReadFile, ListFiles, PatchRead, and PatchApply file-access tools. Because os.path.join returns an absolute `p` unchanged (ignoring workdir) and does not resolve '../' sequences, an agent invocation whose file-tool arguments include an absolute path or a traversal sequence can read or write files outside the configured working directory. Severity reflects that this affects an illustrative cookbook example rather than a core library API; applications that copy this pattern into production are affected.
Published: 2026-08-05
Score: 7.1 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The pocketflow-coding-agent cookbook example implements a helper that combines a working directory with a supplied path without canonicalization or containment checks. When the ReadFile, ListFiles, PatchRead, or PatchApply tools invoke this helper, an attacker can provide an absolute path or a sequence that traverses directories. This allows the agent to read or write files outside its intended working directory, effectively leaking or modifying arbitrary files.

Affected Systems

The vulnerable code resides in The‑Pocket’s PocketFlow, specifically the pocketflow‑coding‑agent cookbook example. No exact version information is supplied, so any deployment that includes this example and has the file‑tool helpers exposed is potentially affected.

Risk and Exploitability

The vulnerability scores a CVSS of 7.1 and is not listed in CISA’s KEV catalog. Because the bug permits file access through untrusted input to a helper used by several file‑tool commands, an attacker who can supply arguments to the agent—either through a local interface or an exposed API—can exploit the flaw. The lack of an EPSS score means the current public data does not indicate widespread exploitation, but the high severity suggests that exposure should be addressed promptly.

Generated by OpenCVE AI on August 5, 2026 at 08:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update to a recent revision of the pocketflow‑coding‑agent cookbook example that adds proper canonicalization and containment checks before resolving file paths.
  • Add defensive checks that reject absolute paths and any traversal sequences (e.g., "../") before they are passed to os.path.join.
  • Restrict or disable the agent’s ReadFile, ListFiles, PatchRead, and PatchApply tools if they are not required by the deployment.

Generated by OpenCVE AI on August 5, 2026 at 08:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

References
History

Wed, 05 Aug 2026 07:30:00 +0000

Type Values Removed Values Added
Description The pocketflow-coding-agent cookbook example in The-Pocket/PocketFlow implements a `_path(workdir, p)` helper as a thin os.path.join(workdir, p) wrapper with no canonicalization or containment check, used unguarded by the ReadFile, ListFiles, PatchRead, and PatchApply file-access tools. Because os.path.join returns an absolute `p` unchanged (ignoring workdir) and does not resolve '../' sequences, an agent invocation whose file-tool arguments include an absolute path or a traversal sequence can read or write files outside the configured working directory. Severity reflects that this affects an illustrative cookbook example rather than a core library API; applications that copy this pattern into production are affected.
Title PocketFlow: Path Traversal in pocketflow-coding-agent Cookbook Example File Tools
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-05T06:58:41.309Z

Reserved: 2026-06-17T12:59:17.621Z

Link: CVE-2026-55747

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T08:30:04Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')