Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft agent prompt with absolute path or '../' traversal sequence
-
DeliveryAgent calls ReadFile/PatchApply tool with attacker-controlled path
-
Exploit_path() passes argument directly to os.path.join without canonicalization
-
ExecutionPython returns absolute path unchanged, discarding workdir prefix
-
ImpactAgent reads or writes arbitrary file on host filesystem
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the pocketflow-coding-agent cookbook example - or production code copied from it - is deployed and reachable by the attacker, and that the attacker can influence the file path argument passed to the ReadFile, ListFiles, PatchRead, or PatchApply agent tools. No special server configuration or non-default feature flag is required; the vulnerability exists in the base |
| Impact | The CVSS 3.1 score of 7.1 (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N) captures meaningful risk but must be interpreted against the deployment context. The High complexity (AC:H) and required user interaction (UI:R) moderate the raw score - exploitation requires a caller to supply crafted file paths to the agent, which may depend on how the agent is exposed. Confidentiality and Integrity are both rated High because successful exploitation yields unconstrained filesystem read and write access outside the workdir, with no availability impact noted. No EPSS score was provided, so probabilistic exploitation frequency cannot be quantified from available data. Crucially, this is cookbook example code, not a shipping library: real-world risk is bounded by how many developers copied this pattern into production agents. Where it has been copied, exploitation requires no authentication or elevated privileges if the agent endpoint is publicly accessible - the bypass itself requires zero attacker sophistication beyond knowing Python's |
| Exploit ScenarioDerived | An operator deploys the pocketflow-coding-agent cookbook example as a production coding assistant exposed to end users. An attacker submits a prompt instructing the agent to read |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 05, 2026
Path traversal in the PocketFlow pocketflow-coding-agent cookbook example exposes arbitrary filesystem reads and writes to any caller who can influence the file-tool arguments supplied to an agent invocation. The vulnerable _path(workdir, p) helper wraps os.path.join without canonicalization, meaning Python's own documented behavior - returning an absolute p unchanged and not resolving ../ sequences - silently discards the intended working-directory containment. Affected file tools include ReadFile, ListFiles, PatchRead, and PatchApply. A publicly available proof-of-concept exists; this is not confirmed in CISA KEV, but the trivial nature of the bypass (standard Python behavior) makes exploitation straightforward wherever the pattern has been copied into production.
RemediationAI
No vendor-released patched version is independently confirmed from the available data - the GitHub repository (https://github.com/The-Pocket/PocketFlow) should be monitored for a fix. Developers who have copied the _path() pattern into production must replace os.path.join(workdir, p) with a safe equivalent: first resolve the full path with os.path.realpath(os.path.join(workdir, p)), then assert that the result starts with os.path.realpath(workdir) + os.sep before permitting any file operation. Failing that assertion must raise an exception and abort the tool call. As a compensating control where immediate code changes are not feasible, restrict the OS user account running the agent to read/write permissions only on the intended workdir subtree using filesystem ACLs or a chroot/container sandbox - this limits blast radius if traversal occurs but does not eliminate the vulnerability. Running the agent inside a container with a minimal, read-only root filesystem and only the workdir volume mounted is the strongest available workaround until a patch is released.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is the pocketflow-coding-agent cookbook example published under The-Pocket/PocketFlow (CPE: cpe:2.3:a:the-pocket:pocketflow_(pocketflow-coding-agent_cookbook_example):*:*:*:*:*:*:*:*). The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal), manifesting through a well-documented Python quirk: os.path.join('/safe/workdir', '/etc/passwd') returns /etc/passwd because Python treats the second argument as the new root if it is absolute. Additionally, relative traversal sequences such as ../../etc/shadow are passed through unresolved. The _path() helper performs neither os.path.realpath() normalization nor a prefix check to verify the resolved path remains under the workdir tree. This flaw propagates to four distinct file-access tools (ReadFile, ListFiles, PatchRead, PatchApply), meaning both read and write primitives are affected. The issue is classified as illustrative example code rather than a core library API, but any production system that copied or adapted this pattern is identically vulnerable.
Know when Pocketflow Pocketflow Coding Agent Cookbook Example gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Network vector applies if agent is service-exposed; AC:H reflects need for crafted input; both C and I are High since read and write primitives are both bypassed; A:N as no availability impact is described.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
Lifecycle Timeline
3DescriptionCVE.org
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.
Executive ViewAI
PocketFlow's coding agent component contains a path traversal vulnerability enabling attackers to read and write arbitrary files on affected systems without proper access controls. Organizations relying on this component face immediate data exposure and operational integrity risks, particularly when agents process sensitive source code, configuration files, or deployment artifacts.
No vendor-released patch identified at time of analysis. Deploy immediate mitigations: (1) canonicalize all file paths using os.path.realpath() followed by directory containment checks to verify paths remain within intended working directory; (2) enforce filesystem isolation via chroot, containers, or restrictive ACLs limiting agent file operations to designated sandboxes; (3) disable file-tool features if not actively required; (4) monitor file access logs for exploitation indicators including '../' sequences and absolute-path arguments.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-53195
GHSA-8v55-7p5p-6r5c
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB