# CVE-2026-54327: Earendil Pi race condition in auth.json credential storage

Source: https://junglewise.ai/threats/cve-2026-54327-earendil-pi-race-condition-in-auth-json-credential-storage  
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-54327 · Severity: low · CVSS 3.1 · Published 2026-06-23

Pi is a terminal-based tool used by developers for coding tasks. A security flaw in how it saves login information could allow other users on the same computer to briefly access sensitive API keys and OAuth tokens. This could lead to unauthorized access to the developer's connected accounts and services.

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-54327 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54327 being exploited in the wild.

**How severe is CVE-2026-54327?** Low severity, with a CVSS score of 3.1, published 23 June 2026.

**Which products and versions are affected?** Earendil-Works Pi-Coding-Agent >= 0.28.0, <= 0.73.1, >= 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.28.0, <= 0.73.1, SEMVER:introduced=0.28.0,last_affected=0.73.1.

**Is there a fix for CVE-2026-54327?** 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-54327 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-54327?** Check whether you run Earendil-Works Pi-Coding-Agent, @earendil-works/pi-coding-agent (npm) or @mariozechner/pi-coding-agent (npm) 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

A Time-of-Check Time-of-Use (TOCTOU) race condition exists in the 'auth.json' write path of the Pi coding agent. The application originally created or rewrote the credential file using default process umask permissions before subsequently tightening them to owner-only (0600). During this window, a local attacker with traverse/read access to the configuration directory could capture sensitive credentials including API keys and OAuth tokens. The vulnerability is resolved in version 0.78.1 by ensuring the file is created with the correct restrictive permissions at open time.

## Affected products

- earendil-works pi-coding-agent >= 0.74.0, < 0.78.1
- mariozechner pi-coding-agent >= 0.28.0, <= 0.73.1

## Identifiers

- CVE-2026-54327
- GHSA-r95r-rj6r-c39x

## Timeline

- 2026-05-29: other: Report received
- 2026-06-02: patched: Fix committed
- 2026-06-04: other: Fixed version released
- 2026-06-08: advisory: GitHub advisory published
- 2026-06-23: disclosed: NVD publication

## References

- [https://github.com/earendil-works/pi/commit/135fb545f99106a4a249274f129b90bc0a77d347](https://github.com/earendil-works/pi/commit/135fb545f99106a4a249274f129b90bc0a77d347)
- [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-r95r-rj6r-c39x](https://github.com/earendil-works/pi/security/advisories/GHSA-r95r-rj6r-c39x)

## Related threats

- [earendil-works Pi code execution via predictable temporary paths](https://junglewise.ai/threats/cve-2026-54328-earendil-works-pi-code-execution-via-predictable-temporary-paths)
- [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)
