# CVE-2026-54328: earendil-works Pi code execution via predictable temporary paths

Source: https://junglewise.ai/threats/cve-2026-54328-earendil-works-pi-code-execution-via-predictable-temporary-paths  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-23. Updated: 2026-06-23  
License: CC BY 4.0 with a link back

CVE-2026-54328 · Severity: high · CVSS 7.3 · Published 2026-06-23

Pi, a terminal-based coding tool, contains a security flaw in how it handles temporary extension packages. On shared Linux systems, a malicious user could place a fraudulent package in a predictable temporary folder before a victim attempts to install an extension. If successful, the attacker can run their own code with the victim's permissions, potentially leading to data theft or full system access.

Technologies: [Earendil-Works Pi-Coding-Agent](https://junglewise.ai/threats/technologies/pi-coding-agent), [@earendil-works/pi-coding-agent (npm)](https://junglewise.ai/threats/technologies/earendil-works-pi-coding-agent), [@mariozechner/pi-coding-agent (npm)](https://junglewise.ai/threats/technologies/mariozechner-pi-coding-agent). Vendors: [Earendil-Works](https://junglewise.ai/threats/vendors/earendil-works), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-54328 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54328 being exploited in the wild.

**How severe is CVE-2026-54328?** High severity, with a CVSS score of 7.3, published 23 June 2026.

**Which products and versions are affected?** Earendil-Works Pi >= 0.74.0, < 0.78.1; Earendil-Works Pi-Coding-Agent >= 0.74.0, < 0.78.1; @earendil-works/pi-coding-agent (npm) >= 0.74.0, < 0.78.1, SEMVER:introduced=0.74.0,fixed=0.78.1; @mariozechner/pi-coding-agent (npm) >= 0.50.0, <= 0.73.1, SEMVER:introduced=0.50.0,last_affected=0.73.1.

**Is there a fix for CVE-2026-54328?** Yes. @earendil-works/pi-coding-agent (npm): upgrade to 0.78.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54328 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-54328?** Check whether you run Earendil-Works Pi, Earendil-Works Pi-Coding-Agent, @earendil-works/pi-coding-agent (npm) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @earendil-works/pi-coding-agent (npm): upgrade to 0.78.1 or later

  ```sh
  npm install @earendil-works/pi-coding-agent@0.78.1
  ```


## Technical details

Pi (versions 0.74.0 to 0.78.1) is vulnerable to a local privilege escalation/code execution flaw (CWE-379) due to the use of predictable paths in the shared system temporary directory (e.g., `os.tmpdir()/pi-extensions`). On multi-user Linux systems, an attacker with local access can pre-create these directories with malicious extension code. When a victim user subsequently runs Pi to install a temporary extension from npm or git, the application may load and execute the attacker's code within the victim's process context. The vulnerability is mitigated in version 0.78.1 by moving the extension cache to a private, user-specific directory (`~/.pi/agent/tmp/extensions`) with restricted (0700) permissions.

## Affected products

- earendil-works Pi >= 0.74.0, < 0.78.1

## Identifiers

- CVE-2026-54328
- GHSA-jfgx-wxx8-mp94

## Timeline

- 2026-06-02: patched: Fixes committed to repository
- 2026-06-23: disclosed: CVE published to NVD

## References

- [https://github.com/earendil-works/pi/commit/a98e087e5d08ea2a536bf73dbb0aebb87c3ef72e](https://github.com/earendil-works/pi/commit/a98e087e5d08ea2a536bf73dbb0aebb87c3ef72e)
- [https://github.com/earendil-works/pi/commit/ea3465a8e371a12d0167a06b60f93878e3a3df44](https://github.com/earendil-works/pi/commit/ea3465a8e371a12d0167a06b60f93878e3a3df44)
- [https://github.com/earendil-works/pi/pull/5345](https://github.com/earendil-works/pi/pull/5345)
- [https://github.com/earendil-works/pi/releases/tag/v0.78.1](https://github.com/earendil-works/pi/releases/tag/v0.78.1)
- [https://github.com/earendil-works/pi/security/advisories/GHSA-jfgx-wxx8-mp94](https://github.com/earendil-works/pi/security/advisories/GHSA-jfgx-wxx8-mp94)

## Related threats

- [Earendil Pi race condition in auth.json credential storage](https://junglewise.ai/threats/cve-2026-54327-earendil-pi-race-condition-in-auth-json-credential-storage)
- [earendil-works Pi XSS in HTML session exports](https://junglewise.ai/threats/cve-2026-54326-earendil-works-pi-xss-in-html-session-exports)
- [earendil-works Pi arbitrary code execution via untrusted project extensions](https://junglewise.ai/threats/cve-2026-54325-earendil-works-pi-arbitrary-code-execution-via-untrusted-project)
