Skip to main content

PocketFlow Cookbook CVE-2026-55747

| EUVDEUVD-2026-53195 MEDIUM
Path Traversal (CWE-22)
2026-08-05 TuranSec GHSA-8v55-7p5p-6r5c
6.8
CVSS 3.1 · Vendor: TuranSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft agent prompt with absolute path or '../' traversal sequence
  2. Delivery
    Agent calls ReadFile/PatchApply tool with attacker-controlled path
  3. Exploit
    _path() passes argument directly to os.path.join without canonicalization
  4. Execution
    Python returns absolute path unchanged, discarding workdir prefix
  5. Impact
    Agent 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 _path() helper used unconditionally by all four tools. Exploitation is limited by access to the agent invocation interface: if the agent is exposed as an unauthenticated network service, no authentication or privileges are needed. If the agent requires authentication or runs locally, those access controls serve as the primary barrier - but no containment is provided by the vulnerable code itself. The attack does not require any specific OS, platform, or runtime beyond a standard Python environment.

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 os.path.join semantics. A public proof-of-concept exists (TuranSec / GitHub), which meaningfully lowers the bar for opportunistic exploitation in any production deployment. No KEV listing confirms active exploitation at time of analysis, but the trivial bypass and public POC make this a priority wherever the affected pattern is deployed.

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 /etc/passwd or ../../.ssh/id_rsa using the ReadFile tool. Because _path() calls os.path.join(workdir, '/etc/passwd') and Python returns /etc/passwd unmodified, the agent opens and returns the file contents with no error. A public proof-of-concept demonstrating this behavior is available at the project's GitHub repository.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

PocketFlow (pocketflow-coding-agent cookbook example) 0

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

Vendor (TuranSec) PRIMARY 6.8 HIGH
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
vuln.today AI 6.8 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

3
Severity Changed
Aug 05, 2026 - 08:22 NVD
HIGH MEDIUM
CVSS changed
Aug 05, 2026 - 08:22 NVD
7.1 (HIGH) 6.8 (MEDIUM)
CVE Published
Aug 05, 2026 - 06:58 cve.org
HIGH 7.1

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Low
illustrative cookbook example, not a production library API
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

54
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy