Skip to main content

Pi Coding Agent EUVDEUVD-2026-38580

| CVE-2026-54328 HIGH
Creation of Temporary File in Directory with Insecure Permissions (CWE-379)
2026-06-17 https://github.com/earendil-works/pi GHSA-jfgx-wxx8-mp94
7.3
CVSS 3.1 · Vendor: https://github.com/earendil-works/pi
View

Attack ChainAIDerived

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

  1. Access
    Gain local account on shared Linux host
  2. Delivery
    Predict pi extension temp path under /tmp/pi-extensions
  3. Exploit
    Pre-stage malicious package files at expected path
  4. Execution
    Victim runs pi -e with matching npm/git source
  5. Persist
    pi loads attacker code as victim user
  6. Impact
    Access victim's files, keys, and credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Temp file permissions
Exploitation Conditions

Requires (1) a local unprivileged shell account on the same Linux host with write access to the shared os.tmpdir() (typically /tmp with sticky-bit mode 1777); (2) a vulnerable pi version installed and reachable by the victim - @earendil-works/pi-coding-agent 0.74.0-0.78.0 or @mariozechner/pi-coding-agent 0.50.0-0.73.1; (3) the victim must subsequently invoke pi with --extension/-e against an npm or git package source whose identifier the attacker can predict (npm spec, or git host+path) so the deterministic path under os.tmpdir()/pi-extensions matches what the attacker pre-staged. Exploitation is LIMITED by: required victim interaction (UI:R in CVSS - the victim must actually run pi with a temp extension source), local-only attack vector (no network path), and platform - Windows/macOS use per-user temp directories by default and are not exposed unless TMPDIR/TMP is overridden to a shared writable location. No race condition needs to be won.

Impact

CVSS 7.3 with AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H accurately reflects the dynamics: exploitation is local, low-complexity (just pre-create a directory tree), needs only an unprivileged local account (PR:L), but requires the victim to actually invoke pi -e with a temporary package source the attacker can predict (UI:R). EPSS and CISA KEV both have no entry - consistent with a niche developer-tooling package affecting a narrow shared-host scenario rather than mass-exploitable infrastructure, so EPSS likely sits very low and this should not be triaged like a remote unauthenticated RCE. The real-world priority is high specifically for organizations running pi on multi-tenant Linux build/CI/HPC systems, where account separation is the security boundary being broken; for single-user developer laptops and Windows/macOS defaults (per-user temp dir) the practical risk is materially lower. No public PoC identified at time of analysis, but the predictable path scheme is simple enough that exploitation is straightforward once the target invocation is known.

Exploit ScenarioDerived

On a shared Linux CI runner, attacker user mallory knows that engineer victim periodically runs pi -e npm:internal-helper from build jobs; mallory computes the deterministic /tmp/pi-extensions/... path for that npm spec and pre-creates it with a malicious package.json and JavaScript entrypoint. When victim next invokes pi with that extension source, pi sees the path exists, skips the real npm install, and loads mallory's code in-process, giving mallory arbitrary code execution as victim and access to victim's source, SSH keys, and CI secrets.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 17, 2026

Local privilege escalation in the Pi coding agent (npm packages @earendil-works/pi-coding-agent 0.74.0-0.78.0 and @mariozechner/pi-coding-agent 0.50.0-0.73.1) allows a co-resident attacker on a shared Linux host to pre-stage attacker-controlled extension code in a predictable os.tmpdir()/pi-extensions path that pi later loads as the victim user. No public exploit identified at time of analysis, but the issue was reported by CrowdStrike researchers and patched in 0.78.1 of the renamed package. Affects shared dev boxes, CI runners, and HPC login nodes; Windows/macOS default per-user temp directories typically avoid exposure.

RemediationAI

Vendor-released patch: @earendil-works/pi-coding-agent 0.78.1 - upgrade via npm i -g @earendil-works/pi-coding-agent@^0.78.1 (or pin in your package manifest). Users still on the deprecated @mariozechner/pi-coding-agent package must migrate to @earendil-works/pi-coding-agent >= 0.78.1, as no fix was issued under the old name. See the advisory at https://github.com/earendil-works/pi/security/advisories/GHSA-jfgx-wxx8-mp94 and the fix PR https://github.com/earendil-works/pi/pull/5345 (commits a98e087 and ea3465a) plus release https://github.com/earendil-works/pi/releases/tag/v0.78.1. If immediate upgrade is not possible, the vendor-recommended workarounds are to avoid --extension/-e with npm or git sources on shared Linux hosts (trade-off: loses the temporary extension-install convenience), and/or set TMPDIR to a private directory you own with 0700 permissions before launching pi (trade-off: must be set in every shell/CI job that runs pi, and any process that inherits this env var will share the constrained temp dir). Always review third-party extensions before loading, since pi extensions execute with the invoking user's full privileges.

Affected VersionsENISA

pi 0.74.0, < 0.78.1

Affected Packages

npm @earendil-works/pi-coding-agent fix: 0.78.1
npm @mariozechner/pi-coding-agent no fix
euvd pi_0_74_0 fix: 0.78.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in npm, euvd

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

Technical ContextAI · show details

Pi is a Node.js-based coding agent that supports loading extensions on-demand via --extension/-e from npm or git package sources. The package manager (packages/coding-agent/src/core/package-manager.ts) computed a deterministic install root under os.tmpdir()/pi-extensions derived purely from public source identifiers (npm spec, or git-<host> plus a sha256 hash of the host+path), and treated the package as already installed whenever that path existed on disk. On Linux, os.tmpdir() resolves to the world-writable /tmp (mode 1777) shared across all local accounts, so any user could mkdir the future path with their own contents and rely on pi's existsSync-gated short-circuit to skip the real install. This is a textbook CWE-379 (creation of temporary file in directory with insecure permissions) issue, here applied to a directory tree used as a code-loading cache. The fix introduces getExtensionTempFolder rooted at ~/.pi/agent/tmp/extensions with explicit mkdirSync({mode: 0o700}) plus chmodSync(0o700), and also hardens git clone path containment within the managed install root.

Know when Crowdstrike 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 (https://github.com/earendil-works/pi) PRIMARY 7.3 HIGH
AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.3 HIGH

Local attacker with unprivileged shell on shared host (AV:L, PR:L), trivial path pre-staging (AC:L), but needs victim to invoke pi with matching extension source (UI:R); full code execution as victim yields C/I/A:H.

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

Primary rating from Vendor (https://github.com/earendil-works/pi).

CVSS VectorVendor: https://github.com/earendil-works/pi

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts

Pi versions with temporary npm or git extension package installs used predictable paths under the operating system temporary directory. On Linux-based multi-user systems, a local attacker who can write to the shared temporary directory could prepare the expected package location before another user runs pi with a temporary extension package source. Pi could then load attacker-controlled extension code in the victim user's process.

Info

The vulnerable code path affected temporary extension package sources loaded with --extension or -e, specifically npm and git package sources. The temporary npm install root and temporary git clone paths were deterministic and rooted under os.tmpdir()/pi-extensions. The path was derived from public source information rather than from a per-user private directory or an unpredictable temporary directory.

During resource resolution, pi considered an npm package or git checkout present if the expected package path already existed. Extension resources discovered from that package location were then loaded by the extension loader. Because extensions execute with the same privileges as the invoking pi process, pre-created temporary package contents could execute as the victim user.

The issue primarily affects Linux-based multi-user hosts where the operating system temporary directory is shared across user accounts, such as shared development machines, CI runners, HPC login nodes, and similar environments. On Windows and macOS, the default temporary directory is typically user-scoped, so default configurations are not expected to be affected unless the temporary directory is overridden to a shared writable location.

Impact

A local attacker with access to the same host can exploit this only if a victim runs a vulnerable pi version with a temporary npm or git extension package source that maps to the attacker-prepared location. No network attack path is involved and no race must be won, but victim interaction is required.

Successful exploitation can allow arbitrary extension code execution as the victim user. This can expose or modify files accessible to that user and can also cause denial of service or data loss through malicious package contents or unsafe temporary cache entries.

Affected versions

  • @earendil-works/pi-coding-agent: affected >= 0.74.0, < 0.78.1; patched >= 0.78.1
  • @mariozechner/pi-coding-agent: affected >= 0.50.0, <= 0.73.1; no patched version was released under the old package name. Migrate to @earendil-works/pi-coding-agent >= 0.78.1.

The solution

Version 0.78.1 moves temporary extension package installs to a private per-user directory under ~/.pi/agent/tmp/extensions and enforces 0700 permissions on that directory. The same release also hardens git package source path handling so managed clone paths remain inside their intended install roots.

Recommendations

Upgrade to @earendil-works/pi-coding-agent version 0.78.1 or later. Users of the deprecated @mariozechner/pi-coding-agent package should migrate to the @earendil-works/pi-coding-agent package and upgrade to a fixed version.

On shared Linux hosts, avoid using temporary npm or git extension package sources with vulnerable versions. Review any third-party extensions before loading them, because pi extensions run with full access to the invoking user's account.

Workarounds

If upgrading immediately is not possible, avoid --extension or -e with npm or git package sources on shared Linux systems. As an additional mitigation for vulnerable versions, configure the process temporary directory environment to point at a directory owned by the invoking user with 0700 permissions before starting pi.

Timeline

  • 2026-05-29: Report received
  • 2026-06-02: Fix committed
  • 2026-06-04: Fixed version 0.78.1 released
  • 2026-06-08: Advisory prepared for publication

Credits

Reported by Paul Urian and Cosmin Alexa of CrowdStrike.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 30 npm packages depend on @earendil-works/pi-coding-agent (30 direct, 0 indirect)
  • 1 npm packages depend on @mariozechner/pi-coding-agent (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 0.74.0 and other introduced versions.

Executive ViewAI

Why It Matters

The Pi coding agent npm packages (@earendil-works/pi-coding-agent versions 0.74.0-0.78.0 and @mariozechner/pi-coding-agent versions 0.50.0-0.73.1) contain a local privilege escalation vulnerability that allows attackers with shell access on shared Linux systems to execute code as other users. This creates cascading risk in organizations using these packages across development machines, CI/CD infrastructure, and shared computing environments where multiple users operate. Unpatched systems could enable attackers to steal credentials, modify code, or inject backdoors with minimal detection risk.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Threat Intel
1
1 source
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 HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

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

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2026-40050 CRITICAL
9.8 Apr 21

Unauthenticated path traversal in CrowdStrike LogScale cluster API allows remote attackers to read arbitrary files from

CVE-2026-103056 CRITICAL
9.4 Sep 30

Command injection in the AiSOC actions service (AiSOC 7.2.0 up to, but excluding, 12.0.0) allows a low-privileged authen

CVE-2026-40058 HIGH
8.8 Sep 15

Local privilege escalation in the CrowdStrike Falcon sensor for Windows occurs when the Microsoft Office File Malicious

CVE-2022-2841 LOW POC
2.7 Aug 22

A vulnerability was found in CrowdStrike Falcon 6.31.14505.0/6.42.15610/6.44.15806. Rated low severity (CVSS 2.7), this

CVE-2025-42706 MEDIUM
6.5 Oct 08

Arbitrary file deletion in the CrowdStrike Falcon sensor for Windows (versions before 7.24) requires an attacker to alre

CVE-2025-42701 MEDIUM
5.6 Oct 08

Arbitrary file deletion in the CrowdStrike Falcon sensor for Windows (versions below 7.24) is possible when an attacker

CVE-2025-37728 MEDIUM
5.4 Oct 07

Credential disclosure in Elastic Kibana's Crowdstrike connector lets an authenticated user who can create and run connec

CVE-2026-76380 MEDIUM
4.3 Aug 19

Cleartext exposure of document passwords in the CrowdStrike OAuth API app for Splunk SOAR (versions below 5.1.3) allows

CVE-2026-54326 LOW
2.5 Jun 16

Stored XSS in the HTML session export feature of pi-coding-agent allows script execution in an exported document when a

CVE-2026-54327 LOW
2.2 Jun 17

Credential disclosure in Pi coding agent affects all versions of @mariozechner/pi-coding-agent (>=0.28.0, <=0.73.1) and

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