CVE-2026-55747

PocketFlow - Path Traversal in pocketflow-coding-agent Cookbook Example File Tools

Published Aug 5, 2026 CVSS 3.1 · 6.8 Medium EPSS < 1% KEV · Not listed
Description
The pocketflow-coding-agent cookbook example in The-Pocket/PocketFlow implements a 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. Severity reflects that this affects an illustrative cookbook example rather than a core library API; applications that copy this pattern into production are affected.

Analysis

AI-generated

Technical impact

The pocketflow‑coding‑agent cookbook example in The‑Pocket’s PocketFlow includes a helper that simply joins a working directory and a supplied path via os.path.join without performing canonicalization or containment checks. This helper is used by the ReadFile, ListFiles, PatchRead, and PatchApply file‑access tools without any guard clauses. As a result, an attacker who can supply a path argument can navigate outside the intended directory, allowing the agent to read or modify arbitrary files. Although the flaw resides in an illustrative cookbook example rather than a core library API, applications that copy this pattern into production can be affected with the same arbitrary file read/write capability.

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 exposes its file‑tool helpers may be affected.

Risk and Exploitability

The vulnerability scores a CVSS of 6.8 and is not listed in CISA’s KEV catalog. Because the bug permits file access through untrusted input to helpers used by several file‑tool commands, an attacker who can supply arguments to the agent—either via a local interface or an exposed API—can exploit the flaw. The EPSS score of less than 1% indicates a very low exploitation probability, yet the moderate severity warrants that exposure be addressed promptly.

Remediation

No solution or workaround provided in the CVE record.

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 10, 2026 at 23:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
References
History
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. The pocketflow-coding-agent cookbook example in The-Pocket/PocketFlow implements a 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. Severity reflects that this affects an illustrative cookbook example rather than a core library API; applications that copy this pattern into production are affected.
Type Values Removed Values Added
Title PocketFlow: Path Traversal in pocketflow-coding-agent Cookbook Example File Tools PocketFlow - Path Traversal in pocketflow-coding-agent Cookbook Example File Tools
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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'}

cvssV3_1

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

Type Values Removed Values Added
First Time appeared The-pocket
The-pocket pocketflow (pocketflow-coding-agent Cookbook Example)
Vendors & Products The-pocket
The-pocket pocketflow (pocketflow-coding-agent Cookbook Example)
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'}

Weaknesses
  • CWE-22

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

Sources

Status
PUBLISHED
Assigner
TuranSec
Published
Updated
Aug 10, 2026, 11:44 AM
Reserved
Jun 17, 2026, 12:59 PM
Status
Deferred
Published
Aug 5, 2026, 8:16 AM
Modified
Oct 24, 2026, 4:10 PM