CVE-2026-54327
Received Received - Intake
Pi Stored Credentials Race Condition in auth.json

Publication date: 2026-06-23

Last updated on: 2026-06-23

Assigner: GitHub, Inc.

Description
Pi is a minimal terminal coding harness. From 0.74.0 until 0.78.1, 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. This vulnerability is fixed in 0.78.1.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-23
Last Modified
2026-06-23
Generated
2026-06-24
AI Q&A
2026-06-23
EPSS Evaluated
N/A
NVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
earendil-works pi-coding-agent From 0.74.0 (inc) to 0.78.0 (inc)
earendil-works pi-coding-agent 0.78.1
mariozechner pi-coding-agent From 0.28.0 (inc) to 0.73.1 (inc)
mariozechner pi-coding-agent 0.73.1
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-732 The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.
CWE-367 The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability is a race condition in the Pi coding agent's credential storage mechanism. Specifically, when the auth.json file that stores API keys and OAuth credentials is written, it is initially created with permissions based on the process umask, which may be too permissive. Shortly after, the file permissions are tightened to owner-only access. However, this brief window allows other local users who have read or traverse access to the configuration directory to potentially read sensitive credentials.

The issue affects versions of the Pi coding agent from 0.74.0 up to 0.78.0 (and similarly for the mariozechner/pi-coding-agent versions 0.28.0 to 0.73.1). It was fixed in version 0.78.1 by creating the auth.json file with secure permissions (0600) immediately, eliminating the window of exposure.

Impact Analysis

This vulnerability can lead to the unintended exposure of sensitive API keys and OAuth credentials to other local users on the same system. If an attacker or unauthorized user has local access and can read or traverse the directory containing auth.json, they could potentially access these credentials during the brief window before the file permissions are restricted.

Such exposure could allow unauthorized access to services or APIs that rely on these credentials, potentially leading to further security breaches. However, exploitation requires local access and is not possible remotely.

To mitigate the risk, users should upgrade to the patched version 0.78.1 or later and rotate any credentials that may have been exposed. A temporary workaround involves restricting directory permissions and using a restrictive umask until the upgrade is applied.

Detection Guidance

This vulnerability can be detected by checking the permissions of the auth.json file used by the Pi coding agent. If the file permissions are not set to owner-only (0600), there is a risk that the file was briefly exposed due to the race condition.

You can use commands to inspect the permissions and contents of the auth.json file to detect potential exposure:

  • Check the file permissions of auth.json: ls -l path/to/auth.json
  • Check the directory permissions where auth.json is stored: ls -ld path/to/directory
  • Search for auth.json files with overly permissive permissions (e.g., readable by group or others): find /path/to/pi/config -name auth.json -perm /go+r
  • Review recent changes or creation times of auth.json to identify if the file was rewritten recently: stat path/to/auth.json
Mitigation Strategies

Immediate mitigation steps include upgrading the Pi coding agent to version 0.78.1 or later, where the vulnerability is fixed by creating auth.json with secure permissions (0600) immediately.

Until you can upgrade, you should restrict directory permissions to limit access to the configuration directory and use a restrictive umask to reduce the risk of exposure.

Additionally, if you suspect credentials were exposed, rotate any API keys or OAuth credentials stored in auth.json to prevent unauthorized access.

Compliance Impact

This vulnerability involves a race condition that could briefly expose stored API keys and OAuth credentials in a file with overly permissive permissions before they are restricted to owner-only access.

Such exposure of sensitive authentication credentials could potentially lead to unauthorized access to protected data or systems, which may impact compliance with data protection standards and regulations like GDPR or HIPAA that require safeguarding sensitive information.

However, exploitation requires local access, and the vulnerability has a low severity score (CVSS 2.2). The issue is fixed in version 0.78.1 by creating the auth.json file with secure permissions immediately, reducing the risk of exposure.

To maintain compliance, affected users should upgrade to the patched version and rotate any potentially exposed credentials, especially in multi-user environments.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-54327. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart