Executive brief
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.
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
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