Niska

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

  • Ujawniono: 17.06.2026
  • Aktualizacja: 11.10.2026 10:22

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.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka npm @earendil-works/pi-coding-agent >= 0.74.0, < 0.78.1 0.78.1
Paczka npm @mariozechner/pi-coding-agent >= 0.28.0, <= 0.73.1 brak poprawki

Odnośniki

Ocena CVSS 2.2/10
Wektor CVSS
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N
Słabość (CWE)
CWE-367, CWE-732
Platforma
npm
Paczka
@earendil-works/pi-coding-agent, @mariozechner/pi-coding-agent
Ujawniono
17.06.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-r95r-rj6r-c39x - CC BY 4.0

Historia podatności: @earendil-works/pi-coding-agent

Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
4
Pierwsza → ostatnia
06.2026 06.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Wysoka 1
  • Średnia 1
  • Niska 2

Ujawnienia w latach

  1. 2026: 4
  1. Średnia · 4.4 CVE-2026-54325 < 0.79.0 0.79.0
  2. Pi Agent: Race condition in Pi auth.json writes could expose stored credentials ten wpis
    Niska · 2.2 CVE-2026-54327 >= 0.74.0, < 0.78.1 0.78.1
  3. Niska · 2.5 CVE-2026-54326 >= 0.74.0, < 0.78.1 0.78.1

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.