High, CVSS 8.6npmAmendedPublished
Capgo CLI: symlink-following local secret writes enable arbitrary file overwrite + world-readable credentials (0600 missing)
CVE-2026-56236 · GHSA-8mpm-q7mh-8fvh
- Affected
- npm @capgo/cli < 7.84.6
- Fixed in
- 7.84.6· Vendor fix available
- Issue
- The Capgo CLI writes sensitive local files (.capgo API key file and build credentials JSON) using unsafe file operations that follow symlinks and do not enforce safe permissions. This allows an attacker-controlled repository to cause arbitrary file overwrite on the developer’s machine when the developer runs the CLI inside that repo. Additionally, global build credentials are written with world-readable permissions (664), exposing signing materials on shared systems. Details Issue 1 - Arbitrary file overwrite via .capgo symlink (login --local) - Location: src/login.ts - Behavior: loginInternal(..., { local: true }) performs writeFileSync('.capgo', ...) before validating the API key with verifyUser(). - No checks are performed to prevent writing through a symlink. - Result: if .capgo is a symlink to an arbitrary path, the CLI overwrites the symlink target with attacker-controlled content (the provided API key string), even when login fails. Issue 2 - Arbitrary file overwrite…
Recommended action: Upgrade to 7.84.6 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.