Categories
CVE-2026-56236 medium CVSS 6.1

Vulnerability in @capgo/cli (CVE-2026-56236)

Summary

Vulnerability in @capgo/cli (CVE-2026-56236). Data can be tampered with by attackers. Mitigation: upgrade to 7.84.6 or later.

Original description

The description as published by the source.

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 n…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-56236 has been found in @capgo/cli.
Data can be tampered with by attackers. CVSS score: 6.1/10.
What to do: upgrade @capgo/cli to 7.84.6 or later.
If unsure, ask your IT team or search "@capgo/cli CVE-2026-56236" on the vendor's site.

CVE-2026-56236 (@capgo/cli) — CWE-59 / CVSS v3 6.1
Attack vector: local / unauthenticated
Patched: 7.84.6 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-59) exists in @capgo/cli.

📍 Affected scope

Check the vendor advisory for the affected versions of @capgo/cli.

🔥 Severity

Severity: Medium (CVSS 6.1/10). Data can be tampered with by attackers.

🔧 How to fix

Update to 7.84.6.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@capgo/cli' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r '@capgo/cli' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で @capgo/cli を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade @capgo/cli to 7.84.6

    ステージング環境で 7.84.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm @capgo/cli
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.84.6"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details