CVE-2026-54325: Pi Terminal Code Execution via Untrusted Project Extensions
Pi is a lightweight terminal-based coding environment that, prior to version 0.79.0, automatically loaded configuration files and extensions from a `.pi` directory in any repository without asking the user for permission first. An attacker could place malicious executable code (disguised as project-local extensions written in TypeScript or JavaScript) in a repository's `.pi` directory. When a user ran Pi in that directory, the malicious code would execute with the same privileges as the Pi process itself—essentially running whatever the attacker wanted on the user's machine. The fix in version 0.79.0 addresses this by requiring explicit user trust before loading project-local resources.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.4 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-829
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-25
NVD description (verbatim)
Pi is a minimal terminal coding harness. Pi before 0.79.0 loaded project-local configuration and resources from a repository's .pi directory without first asking the user to trust that repository. This included project-local extensions, which are executable TypeScript or JavaScript modules loaded into the Pi process. An attacker who controls a repository could place Pi-specific project resources in that repository. If a user then started Pi from that working tree, the project-local extension code could run with the same privileges as the local Pi process without the user having a convenient way to make a trust decision. This vulnerability is fixed in 0.79.0.
7 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-54325 is a privilege abuse vulnerability in Pi versions before 0.79.0 arising from unsafe automatic loading of project-local extensions. The vulnerability stems from a failure to implement a trust boundary before executing untrusted code. When Pi initializes from a repository root, it traverses the `.pi` directory and dynamically loads TypeScript and JavaScript modules as extensions without prior user consent or trust verification. An attacker-controlled repository can leverage this to achieve arbitrary code execution in the context of the local user running Pi. The vector indicates local attack surface (AV:L) with low complexity (AC:L), no privilege requirement (PR:N), and user interaction (UI:R) needed to trigger the initial Pi invocation. The impact is limited to confidentiality and integrity (C:L/I:L) with no availability impact (A:N).
Business impact
For development teams relying on Pi for terminal-based coding workflows, this vulnerability creates supply-chain risk when cloning or switching between repositories. A compromised or attacker-controlled open-source project could silently execute code on developers' machines during routine development setup. This could lead to credential theft, source code exfiltration, or lateral movement into internal networks. Organizations using Pi should treat this as a code-execution risk vector equivalent to malicious npm packages or other dependency-based attacks, requiring both patching and awareness training for developers.
Affected systems
Pi versions prior to 0.79.0 are affected. The vulnerability applies universally to any installation running an older version, regardless of operating system, since the attack vector is file-system-based and the loading mechanism is agnostic to platform. Users running Pi 0.79.0 or later are not affected. The vendor list is empty, indicating Pi is the sole affected product in this CVE's scope.
Exploitability
Exploitability is straightforward but requires user action. An attacker must control or modify a Git repository (public or private) that a target user will clone and open with Pi. The exploit requires no special privileges on the target system and executes with the same user context as Pi. The user interaction requirement (UI:R in the CVSS vector) is met by the routine action of running Pi in a cloned repository—a normal part of development workflows. There is no authentication bypass or network component; this is purely a local code-execution issue triggered by directory traversal and unsafe module loading.
Remediation
Upgrade Pi to version 0.79.0 or later immediately. This version implements a trust verification mechanism before loading project-local extensions, preventing automatic execution of untrusted code. Verify the upgrade in your package manager or build environment. For organizations with development machines still running older Pi versions, prioritize patching as part of regular dependency management. Additionally, audit any repositories that may have been used in development environments while running vulnerable Pi versions to identify whether malicious `.pi` directories were injected.
Patch guidance
1. Identify all machines and CI/CD pipelines running Pi by checking version with `pi --version` or equivalent. 2. Update Pi to 0.79.0 through your package manager (npm, pip, homebrew, etc., depending on installation method). 3. For development teams, update installation instructions and onboarding documentation to require Pi 0.79.0+. 4. If using Pi in automated build or CI/CD pipelines, update lock files and container images to pin Pi 0.79.0 or later. 5. Verify the upgrade in a test environment before rolling out broadly. 6. Document the patching action in your vulnerability management system.
Detection guidance
Look for Pi processes running version numbers below 0.79.0 using package inventory tools or scanning installed software on developer workstations. Check build system logs and CI/CD configuration files for Pi version pinning. Monitor for `.pi` directories appearing in repositories or for suspicious script execution originating from `.pi` paths. If forensic analysis is needed on potentially compromised machines, examine process execution logs for unsigned or unexpected TypeScript/JavaScript module loads initiated from `.pi` directories during development sessions. Endpoint detection tools can flag execution chains where Pi spawns subprocess shells or makes unusual outbound connections immediately after initialization.
Why prioritize this
Although rated MEDIUM severity (CVSS 4.4), this vulnerability warrants prompt patching because it represents silent, automatic code execution in a development context where trust is often implicitly granted to project configurations. The attack surface is broad—any developer cloning a malicious repository is at risk—and the impact could cascade into internal network compromise if the developer's machine has access to sensitive systems. The lack of a KEV listing does not diminish the practical risk; it reflects that this is a relatively new or low-volume threat rather than an indication of low exploitability. Development teams should patch within 1–2 weeks of release.
Risk score, explained
The CVSS 3.1 score of 4.4 (MEDIUM) reflects the combination of local attack vector, low complexity, user interaction requirement, and limited scope. The score appropriately discounts the attack because it requires the user to initiate Pi in an attacker-controlled directory. However, the practical risk is amplified by the fact that cloning and opening repositories is a routine developer action, making the 'user interaction' requirement almost trivial to satisfy. Organizations should apply risk weighting beyond the base score: add points for high-value developer machines, for repositories frequently shared across teams, and for development workflows with direct access to production systems.
Frequently asked questions
Does upgrading to 0.79.0 require any configuration changes?
No. Version 0.79.0 introduces automatic trust prompting when Pi encounters project-local extensions in a `.pi` directory. Users will be asked to approve or deny loading of project-local resources on first run. No manual configuration is required beyond the upgrade itself.
Can we disable project-local extensions entirely as a temporary mitigation?
Consult Pi's documentation for configuration options that may allow disabling project-local extension loading. However, upgrading to 0.79.0 is the primary fix; disabling features should only be a temporary measure while awaiting patch deployment.
If our team uses Pi in a private, internal repository, are we still at risk?
Yes. The vulnerability does not distinguish between public and private repositories. Any person or process with write access to a repository—whether internal or external—could inject a malicious `.pi` directory. Internal threats, compromised accounts, and authorized contributors with malicious intent all remain viable attack vectors.
What if we have Pi pinned to a specific older version in our CI/CD pipeline?
You must update the version pin in your CI/CD configuration to 0.79.0 or later and re-test your pipeline. Older versions will continue to be vulnerable regardless of network isolation; Pi will still load untrusted extensions when invoked on a repository containing a `.pi` directory.
This analysis is provided for informational purposes and reflects information available as of the publication date. CVSS scores and severity ratings are sourced from authoritative vulnerability databases and may be updated over time. Patch version numbers and remediation steps are based on vendor advisories and should be verified against official Pi documentation and release notes before implementation. This content does not constitute professional security advice; organizations should consult with their security teams and follow their internal change management procedures when applying patches. Exploitability assessments are based on the attack vector described and do not reflect all possible real-world attack scenarios. No warranty is provided regarding the completeness or accuracy of detection methods; endpoint detection capabilities vary by tool and environment configuration. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-22551MEDIUMEclipse Theia AI Chat Information Disclosure via Markdown Rendering
- CVE-2022-49036HIGHSynology Active Backup for Business Recovery Media Creator Arbitrary Code Execution
- CVE-2022-49042HIGHSynology Hyper Backup Explorer Arbitrary Code Execution via MinGW DLL
- CVE-2026-11269HIGHChrome Extension Sandbox Escape (v149)
- CVE-2026-12057HIGHFoxit AI Sandbox Escape Arbitrary Code Execution Vulnerability
- CVE-2026-22283HIGHDell PowerFlex Manager Unauthenticated Information Disclosure Vulnerability
- CVE-2026-42089HIGHYeoman Environment Arbitrary Package Installation Vulnerability
- CVE-2026-44358HIGHEspressif DangerJS Action Code Execution in Pull Request Workflows