Skip to main content

phi CVE-2026-108599

| EUVDEUVD-2026-96393 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-10-10 VulnCheck GHSA-mhj6-8rvv-3grj
5.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Victim runs phi on malicious repository
  2. Delivery
    Repo ships symlink pointing outside workspace
  3. Exploit
    Prompt injection steers the write tool
  4. Execution
    Lexical-only gate check bypassed
  5. Impact
    Attacker content written to external file

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Exploitation requires the victim to run the phi agent against an attacker-controlled or attacker-influenced repository while the workspace_only_writes restriction is active (this is the control being bypassed). The repository must contain a symlink resolving to a path outside the workspace, and the agent must process attacker-supplied content that successfully prompt-injects the write tool into targeting that symlinked path; the permission gate then permits the write because it validates the lexical path string rather than the resolved symlink target. Limiting factors: local attack vector (not network-remote), required user interaction (the victim must operate the agent on the untrusted repo), dependency on a prompt-injection succeeding, and applicability only to vulnerable versions 0.1.1 through 0.28.4. The attacker gains no confidentiality or availability impact - only unauthorized integrity (out-of-workspace writes).

Impact

This is a medium-severity, locally-scoped sandbox-escape rather than a high-urgency remote threat. The input CVSS 4.0 vector (CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P, score 5.7) is internally consistent with the description: exploitation is local (the phi agent operates on a local workspace), requires no attacker privileges on the victim host (PR:N - the attacker only supplies a malicious repository), but carries an explicit attack requirement (AT:P) and passive user interaction (UI:P) because the victim must actually run the agent against the attacker's repo and the injected prompt must succeed. Impact is integrity-only (VI:H; VC:N/VA:N), reflecting unauthorized out-of-workspace file writes with no inherent confidentiality or availability loss and no scope change to other systems (SC/SI/SA:N). No EPSS score, no CISA KEV entry, and no explicit POC flag were provided in the input, so exploitation probability cannot be quantified from the data; however, VulnCheck published a detailed advisory plus a HackMD technical write-up referencing the exact vulnerable source lines (gate.go L106-L119, write.go L64-L68), which raises the practical likelihood that working exploit mechanics are reconstructable even though no packaged exploit is confirmed. Net: a genuine security-control bypass worth patching for anyone running phi against untrusted repositories, but not a drop-everything priority given the local vector, required user interaction, dependency on a successful prompt injection, and the product's limited deployment footprint. No conflicting signals between vector and description were found - both agree on local, user-interaction-dependent, integrity-focused exploitation.

Exploit ScenarioDerived

A developer uses the phi AI coding agent (with workspace_only_writes enabled) to work on a repository supplied or influenced by an attacker. The repo contains a symlink pointing outside the workspace plus content crafted to prompt-inject the agent, so that when the write tool is invoked the permission gate's lexical-only path check passes while the resolved symlink target escapes the workspace, writing attacker-influenced content to an external file (e.g. a shell profile or config) without user approval. No packaged public exploit is identified in the input, but VulnCheck's advisory and a HackMD write-up document the exact flawed code paths.

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

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

Alert me

AnalysisAIv1 – Oct 10, 2026

Symlink-based workspace escape in phi 0.1.1 through 0.28.4 lets a malicious repository bypass the agent's workspace_only_writes permission gate and cause the write tool to modify files outside the workspace. The gate compares only the lexical path string, so a symlink committed in the repository that resolves outside the workspace passes validation once prompt injection steers the agent's write tool at that path; the resulting impact is integrity-only (unauthorized out-of-workspace writes) with no confidentiality or availability loss, consistent with the assessed CVSS:3.1 vector AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N and the reported CVSS 4.0 base of 5.7. Exploitation is local and requires the victim to run the agent against an attacker-influenced repository with workspace_only_writes active, making this a medium-severity sandbox escape rather than a remote threat; no public exploit code and no confirmed active exploitation (CISA KEV) were identified at time of analysis.

RemediationAI

Patch status: no vendor-released patch identified at time of analysis - the references list no fixed version, so the primary action is to watch https://github.com/pulseaiclub/phi and https://www.vulncheck.com/advisories/phi-0.1.1-through-0.28.4-symlink-workspace-write-restriction-bypass for a release above 0.28.4 and upgrade as soon as one is published. Until then, the highest-value compensating control is to stop relying on workspace_only_writes as a security boundary and instead run phi inside a container, VM, or bubblewrap/namespace sandbox that exposes only the working repository with no host bind mounts; this fully contains the escape but adds operational overhead and breaks workflows that need access to host toolchains or credentials. Second, treat the repository as untrusted input: clone with symlinks disabled (git config core.symlinks false, which materializes links as plain text files) or scan/strip symlinks whose resolved target falls outside the checkout before invoking the agent; this neutralizes the link half of the chain but can break legitimate repos that depend on in-tree symlinks. Third, if the write tool is not essential, disable it or require explicit per-write human approval so a successful prompt injection cannot silently land bytes outside the workspace, at the cost of losing autonomous editing; administrators can also front the process with an AppArmor/SELinux profile or a read-only mount for sensitive directories such as ~/.ssh, ~/.aws, and shell startup files. Finally, treat repository text as untrusted prompt content - prompt injection is a prerequisite here, so reducing the agent's exposure to untrusted instructions (excluding README/issue text from context, or sanitizing it) lowers the likelihood of the chain completing, without eliminating the underlying link-resolution defect.

Affected VersionsENISA

phi 0.1.1 ≤0.28.4

Affected Packages

euvd phi no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-59 (Improper Link Resolution Before File Access), a classic class of path-validation error in which a security check is performed on the unresolved, lexical path string instead of the fully resolved filesystem target. phi is a Go-based AI coding agent (github.com/pulseaiclub/phi) whose permission gate lives in internal/permission/gate.go (lines 106-119) and whose write primitive lives in internal/tools/writetool/write.go (lines 64-68); the gate appears to validate that the requested path string stays within the workspace root, but it does not call a resolution primitive such as filepath.EvalSymlinks, os.Lstat, or a kernel-enforced confinement like openat2 with RESOLVE_BENEATH/RESOLVE_NO_SYMLINKS before the write occurs. An attacker who controls the repository can therefore commit a symlink whose target is outside the workspace; the lexical check sees a path that still textually begins with the workspace prefix and approves the write, while the operating system follows the link and lands the bytes on an external file. The second required ingredient is prompt injection: because the write tool's target is chosen from attacker-influenced repository content (README files, issues, comments, source strings), the attacker must also convince the model to emit a write to the symlinked path. This is a chain of a path-resolution defect plus an LLM trust-boundary failure, not a memory-safety or code-injection bug, and it grants only write integrity outside the workspace - no reads and no denial of service.

Know when Phi 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 (VulnCheck) PRIMARY 5.7 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.5 MEDIUM

Local because the agent processes a local workspace; PR:N as the attacker only supplies a repo; UI:R since the victim must run the agent on it; integrity-only impact from unauthorized out-of-workspace writes.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

phi 0.1.1 through 0.28.4 contains an improper link resolution vulnerability that allows malicious repositories to bypass workspace_only_writes by exploiting lexical-only path checks in the permission gate. Attackers can commit symlinks pointing outside the workspace and use prompt injection to make the write tool write attacker-influenced content to external files without approval.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Low
niche open-source AI coding agent, limited production deployment footprint
Data Quality
5 sources
Confidence: Medium

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 No
EPSS 0.2%
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· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

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