CVE-2026-54328: Pi Agent Predictable Temporary Extension Install Paths Vulnerability

HIGH
Advisory Identifier: GHSA-jfgx-wxx8-mp94
CVSS 7.3
CWE-379
Published
Advisory Summary

CVE-2026-54328 is a HIGH (CVSS 7.3) predictable temporary extension install paths vulnerability (CWE-379: Creation of Temporary File in Directory with Insecure Permissions) affecting Pi Agent libraries in the npm ecosystem. The issue involves predictable temporary extension install paths allow local privilege escalation on shared linux hosts. Remediation is available by upgrading affected packages to version 0.78.1.

CVE-2026-54328 at a Glance

CVE Identifier CVE-2026-54328
GHSA Identifier GHSA-jfgx-wxx8-mp94
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-379: Creation of Temporary File in Directory with Insecure Permissions
Affected Product Pi Agent
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-54328

To remediate this vulnerability, upgrade all affected Pi Agent dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@earendil-works/pi-coding-agent fixed: 0.78.1
npm install @earendil-works/pi-coding-agent@0.78.1
@mariozechner/pi-coding-agent fixed: Latest secure release
npm install @mariozechner/pi-coding-agent@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @earendil-works/pi-coding-agent

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-54328, inspect your project dependencies using npm:

npm ls @earendil-works/pi-coding-agent

Analyze the terminal output to locate any version of Pi Agent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.78.1), your application is affected.

Note: The npm ls @earendil-works/pi-coding-agent command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-379: Creation of Temporary File in Directory with Insecure Permissions, where the product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file. In Pi Agent, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-54328 Affected Pi Agent Versions

2 component(s)
Fixed Versions:
0.78.1
Product / Package Ecosystem Affected Versions Fixed Version
@earendil-works/pi-coding-agent
npm
≥ 0.74.0
< 0.78.1
0.78.1
@mariozechner/pi-coding-agent
npm
≥ 0.50.0
≤ 0.73.1

References

Frequently Asked Questions

What is CVE-2026-54328?
CVE-2026-54328 is a security vulnerability in Pi Agent involving Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts under CWE-379: Creation of Temporary File in Directory with Insecure Permissions.
Which Pi Agent versions are affected?
Affected versions include releases prior to 0.78.1 across affected packages: @earendil-works/pi-coding-agent, @mariozechner/pi-coding-agent.
What version fixes CVE-2026-54328?
Upgrading to 0.78.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @earendil-works/pi-coding-agent affected?
Yes, @earendil-works/pi-coding-agent is affected in releases prior to 0.78.1. Upgrade your dependency to 0.78.1 or later.
Is @mariozechner/pi-coding-agent affected?
Yes, @mariozechner/pi-coding-agent is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-54328?
CVE-2026-54328 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-54328?
CVE-2026-54328 is classified under CWE-379: Creation of Temporary File in Directory with Insecure Permissions (The product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.).
How can I check npm dependencies for CVE-2026-54328?
Run the dependency tree command: 'npm ls @earendil-works/pi-coding-agent'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jfgx-wxx8-mp94",
  "modified" : "2026-07-20T21:13:09Z",
  "published" : "2026-06-17T13:55:13Z",
  "aliases" : [ "CVE-2026-54328" ],
  "summary" : "Pi Agent: Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts",
  "details" : "# Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts\n\nPi 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.\n\n## Info\n\nThe 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.\n\nDuring 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.\n\nThe 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.\n\n## Impact\n\nA 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.\n\nSuccessful 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.\n\n## Affected versions\n\n- `@earendil-works/pi-coding-agent`: affected `>= 0.74.0, < 0.78.1`; patched `>= 0.78.1`\n- `@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`.\n\n## The solution\n\nVersion 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.\n\n## Recommendations\n\nUpgrade 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.\n\nOn 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.\n\n## Workarounds\n\nIf 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.\n\n## Timeline\n\n- 2026-05-29: Report received\n- 2026-06-02: Fix committed\n- 2026-06-04: Fixed version 0.78.1 released\n- 2026-06-08: Advisory prepared for publication\n\n## Credits\n\nReported by Paul Urian and Cosmin Alexa of CrowdStrike.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@earendil-works/pi-coding-agent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.74.0"
      }, {
        "fixed" : "0.78.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@mariozechner/pi-coding-agent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.50.0"
      }, {
        "last_affected" : "0.73.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/earendil-works/pi/security/advisories/GHSA-jfgx-wxx8-mp94"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54328"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/earendil-works/pi/pull/5345"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/earendil-works/pi/commit/a98e087e5d08ea2a536bf73dbb0aebb87c3ef72e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/earendil-works/pi/commit/ea3465a8e371a12d0167a06b60f93878e3a3df44"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/earendil-works/pi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/earendil-works/pi/releases/tag/v0.78.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-379" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-17T13:55:13Z",
    "nvd_published_at" : "2026-06-23T20:16:49Z"
  }
}