Time-of-check Time-of-use (TOCTOU) Race Condition Affecting @earendil-works/pi-coding-agent package, versions <0.78.1


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.07% (1st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-EARENDILWORKSPICODINGAGENT-17739020
  • published30 Jun 2026
  • disclosed23 Jun 2026
  • creditUnknown

Introduced: 23 Jun 2026

NewCVE-2026-54327  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade @earendil-works/pi-coding-agent to version 0.78.1 or higher.

Overview

@earendil-works/pi-coding-agent is a Coding agent CLI with read, bash, edit, write tools and session management

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition through a race condition in the auth.json file write process. An attacker can access sensitive credentials by exploiting a timing window where the file is created or rewritten with broader permissions before being restricted to owner-only access.

CVSS Base Scores

version 4.0
version 3.1