Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-r95r-rj6r-c39x

LOW

GHSA-r95r-rj6r-c39x is a low-severity (CVSS 2.2) CWE-367 vulnerability in @mariozechner/pi-coding-agent. O3 Security confirms whether GHSA-r95r-rj6r-c39x is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

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

Also known asCVE-2026-54327
Published
Jun 17, 2026
Updated
Jul 20, 2026
Affected
2 pkgs
Patched
1 / 2
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.1%probability of exploitation in next 30 days
Lower Risk0th percentile0.00%
0.00%0.19%0.38%0.57%0.1%0.1%Jul 26Jul 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

2 pkgs affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

@mariozechner/pi-coding-agentnpm
584Kdownloads / week
@earendil-works/pi-coding-agentnpm
1.5Mdownloads / week

Description

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 package as well as @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 version 0.78.1 or later. Users still on the deprecated @mariozechner/pi-coding-agent package should migrate to the @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.

Affected Packages

2 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@mariozechner/pi-coding-agent0.28.0No fix
📦npm@earendil-works/pi-coding-agent0.74.0&&< 0.78.10.78.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @mariozechner/pi-coding-agent. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    No patched version of @mariozechner/pi-coding-agent has shipped for GHSA-r95r-rj6r-c39x yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-r95r-rj6r-c39x is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-r95r-rj6r-c39x. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

# 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 be
O3 Security · Impact-Aware SCA

Is GHSA-r95r-rj6r-c39x in your dependencies?

O3 detects GHSA-r95r-rj6r-c39x across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.