---
title: "GHSA-r95r-rj6r-c39x: Pi Agent: Race condition in Pi auth.json writes could expose stored credentials"
description: "Low severity. Pi Agent: Race condition in Pi auth.json writes could expose stored credentials."
url: https://inlinr.com/advisories/GHSA-r95r-rj6r-c39x
lang: en
---

[Packages](https://inlinr.com/packages)

Low Vulnerability GHSA-r95r-rj6r-c39x CVE-2026-54327 Published 17 Jun 2026

# Pi Agent: Race condition in Pi auth.json writes could expose stored credentials

Your version of @earendil-works/pi-coding-agent 

Affected releases · [@earendil-works/pi-coding-agent](https://inlinr.com/packages/@earendil-works/pi-coding-agent)

- 0.78.x 0.78.0 Fixed in 0.78.1
- 0.77.x 0.77.0 No fix on this line yet
- 0.76.x 0.76.0 No fix on this line yet
- 0.75.x 0.75.0 – 0.75.5 No fix on this line yet
- 0.74.x 0.74.0 – 0.74.2 No fix on this line yet

On 0.78.x, the newest line:

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

Every release on a timeline

1.x 

1. Not affected

1.0.0 – 1.6.0  
13 releases, latest

0.x 

1. Affected

0.74.0 – 0.78.0  
12 releases
2. Fixed

0.78.1 – 0.99.2  
40 releases

65 stable releases of @earendil-works/pi-coding-agent, oldest to newest, one row per major.

Your version of @mariozechner/pi-coding-agent 

Affected releases · [@mariozechner/pi-coding-agent](https://inlinr.com/packages/@mariozechner/pi-coding-agent)

- 0.73.x 0.73.0 – 0.73.1 No fix on this line yet
- 0.72.x 0.72.0 – 0.72.1 No fix on this line yet
- 0.71.x 0.71.0 – 0.71.1 No fix on this line yet
- 0.70.x 0.70.0 – 0.70.6 No fix on this line yet
- 0.69.x 0.69.0 No fix on this line yet
- 0.68.x 0.68.0 – 0.68.1 No fix on this line yet
- 0.67.x 0.67.0 – 0.67.68 No fix on this line yet
- 0.66.x 0.66.0 – 0.66.1 No fix on this line yet
- 0.65.x 0.65.0 – 0.65.2 No fix on this line yet
- 0.64.x 0.64.0 No fix on this line yet
- 0.63.x 0.63.0 – 0.63.2 No fix on this line yet
- 0.62.x 0.62.0 No fix on this line yet
- 0.61.x 0.61.0 – 0.61.1 No fix on this line yet
- 0.60.x 0.60.0 No fix on this line yet
- 0.59.x 0.59.0 No fix on this line yet
- 0.58.x 0.58.0 – 0.58.4 No fix on this line yet
- 0.57.x 0.57.0 – 0.57.1 No fix on this line yet
- 0.56.x 0.56.0 – 0.56.3 No fix on this line yet
- 0.55.x 0.55.0 – 0.55.4 No fix on this line yet
- 0.54.x 0.54.0 – 0.54.2 No fix on this line yet
- 0.53.x 0.53.0 – 0.53.1 No fix on this line yet
- 0.52.x 0.52.0 – 0.52.12 No fix on this line yet
- 0.51.x 0.51.0 – 0.51.6 No fix on this line yet
- 0.50.x 0.50.0 – 0.50.9 No fix on this line yet
- 0.49.x 0.49.0 – 0.49.3 No fix on this line yet
- 0.48.x 0.48.0 No fix on this line yet
- 0.47.x 0.47.0 No fix on this line yet
- 0.46.x 0.46.0 No fix on this line yet
- 0.45.x 0.45.0 – 0.45.7 No fix on this line yet
- 0.44.x 0.44.0 No fix on this line yet
- 0.43.x 0.43.0 No fix on this line yet
- 0.42.x 0.42.0 – 0.42.5 No fix on this line yet
- 0.41.x 0.41.0 No fix on this line yet
- 0.40.x 0.40.0 – 0.40.1 No fix on this line yet
- 0.39.x 0.39.0 – 0.39.1 No fix on this line yet
- 0.38.x 0.38.0 No fix on this line yet
- 0.37.x 0.37.0 – 0.37.8 No fix on this line yet
- 0.36.x 0.36.0 No fix on this line yet
- 0.35.x 0.35.0 No fix on this line yet
- 0.34.x 0.34.0 – 0.34.2 No fix on this line yet
- 0.33.x 0.33.0 No fix on this line yet
- 0.32.x 0.32.0 – 0.32.3 No fix on this line yet
- 0.31.x 0.31.0 – 0.31.1 No fix on this line yet
- 0.30.x 0.30.0 – 0.30.2 No fix on this line yet
- 0.29.x 0.29.0 – 0.29.1 No fix on this line yet
- 0.28.x 0.28.0 No fix on this line yet

No release fixes it yet, not even the latest, 0.73.1.

Every release on a timeline

1. Not affected

0.6.2 – 0.27.9  
125 releases
2. Affected

0.28.0 – 0.73.1  
146 releases, latest

271 stable releases of @mariozechner/pi-coding-agent, oldest to newest.

## What happens

Pi auth.json writes could briefly expose stored credentials to local users

Pi stored API keys and OAuth credentials in `auth.json`. A race condition in the file write path could briefly create or rewrite this file with permissions derived from the process umask before tightening the file to owner-only permissions.

Info

The affected credential storage code wrote `auth.json` and then corrected the file mode in a separate operation. During the interval between those operations, a local user who could read and traverse the Pi agent configuration directory could potentially read the file before its permissions were restricted.

The file can contain API keys, OAuth access tokens, and OAuth refresh tokens for configured providers. The affected behavior was present in the original `auth.json` credential storage implementation and thus affects both the original [@mariozechner/pi-coding-agent](https://inlinr.com/packages/@mariozechner/pi-coding-agent) package as well as [@earendil-works/pi-coding-agent](https://inlinr.com/packages/@earendil-works/pi-coding-agent).

Impact

Exploitation requires local access to the same machine and read/traverse access to the victim's Pi agent configuration directory. Users whose `~/.pi/agent` directory is private to their account are less exposed. The main impact is disclosure of stored provider credentials, which may allow use of the configured provider accounts according to the privileges of those credentials.

This is not remotely exploitable by itself.

Affected versions

- Affected: `@mariozechner/pi-coding-agent >= 0.28.0, <= 0.73.1`
- Affected: `@earendil-works/pi-coding-agent >= 0.74.0, < 0.78.1`
- Patched: `@earendil-works/pi-coding-agent >= 0.78.1`

The solution

Version 0.78.1 changed the credential storage writes to create `auth.json` with mode `0600` at open time. The fix applies to initial file creation and credential save paths, including OAuth token refresh writes.

Recommendations

Upgrade to [@earendil-works/pi-coding-agent](https://inlinr.com/packages/@earendil-works/pi-coding-agent) version 0.78.1 or later. Users still on the deprecated [@mariozechner/pi-coding-agent](https://inlinr.com/packages/@mariozechner/pi-coding-agent) package should migrate to the [@earendil-works/pi-coding-agent](https://inlinr.com/packages/@earendil-works/pi-coding-agent) package and install version 0.78.1 or later.

After upgrading, rotate any credentials that may have been exposed on multi-user systems where the Pi agent configuration directory was readable by other local users.

Workarounds

If upgrading immediately is not possible, restrict the Pi agent configuration directory so only the owning user can traverse it, restrict `auth.json` to owner-only permissions, and run Pi with a restrictive umask such as `077` until the upgrade is complete.

Timeline

- 2026-05-29: Report received
- 2026-06-02: Fix committed
- 2026-06-04: Fixed version released
- 2026-06-08: Advisory published

Credits

Reported by Paul Urian and Cosmin Alexa of CrowdStrike.

## How it is exploited

Exploitable with local access, with a low-privilege account and a user to do something.

- **Confidentiality**: low
- **Integrity**: none
- **Availability**: none

CVSS:3.1/​AV:L/​AC:H/​PR:L/​UI:R/​S:U/​C:L/​I:N/​A:N

## References

- [Reference](https://github.com/earendil-works/pi/security/advisories/GHSA-r95r-rj6r-c39x "https://github.com/earendil-works/pi/security/advisories/GHSA-r95r-rj6r-c39x")  
github.com/earendil-works/pi/security/advisorie…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-54327 "https://nvd.nist.gov/vuln/detail/CVE-2026-54327")  
nvd.nist.gov/vuln/detail/CVE-2026-54327
- [Fix commit](https://github.com/earendil-works/pi/commit/135fb545f99106a4a249274f129b90bc0a77d347 "https://github.com/earendil-works/pi/commit/135fb545f99106a4a249274f129b90bc0a77d347")  
135fb54
- [Package](https://github.com/earendil-works/pi "https://github.com/earendil-works/pi")  
github.com/earendil-works/pi
- [Reference](https://github.com/earendil-works/pi/releases/tag/v0.78.1 "https://github.com/earendil-works/pi/releases/tag/v0.78.1")  
github.com/earendil-works/pi/releases/tag/v0.78…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
