T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:17- Finding
Mutable Remote Installer Is Executed Directly Through a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Bitcoin/Lightning wallet skill, but its install and agent workflows expose users to unnecessary risk of code execution and irreversible fund loss.
Install only after reviewing and pinning the installer or building from trusted source. Do not use --no-password for wallets holding real funds, keep seed phrases out of agent transcripts and logs, use small isolated wallets, set explicit fee and spending limits, and require approval before any send, pay, channel, or LSP funding action.
SKILL.md:17Mutable Remote Installer Is Executed Directly Through a Shell
install.sh:40Installer Trusts Mutable Precompiled Binaries and Same-Origin Checksums
SKILL.md:167Agent Workflows Recommend Plaintext Wallet Seeds and Expose Mnemonics in JSON
SKILL.md:1274Messaging Workflow Pays Externally Supplied Invoices Without Required Validation or Approval
Potential security issue detected. Manual review is recommended.
Docker socket not found: If you see Cannot connect to the Docker daemon, your Docker socket may not be at the default path. Set DOCKER_HOST:
export DOCKER_HOST=unix:///var/run/docker.sock
Flaky channel timeouts: Economy tests wait up to 30 seconds for channels to become usable. If a test times out on wait_for_usable_channel, it's usually a timing issue — retry once. Ensure --test-threads=1 to avoid resource contention.
The | sh pattern creates an execution chain where remotely retrieved content is immediately executed, eliminating any opportunity for review or integrity validation. In an agent skill context this is more dangerous than in ordinary docs, because autonomous systems may follow installation guidance verbatim, turning documentation into a direct remote code execution path.
curl -sSL https://raw.githubusercontent.com/synonymdev/bitkit-cli/main/install.sh | sh
Or build from source:
The installer fetches both the binary archive and its checksum file from the same remote source and then trusts that checksum for verification. If the GitHub release, redirect target, or network path is compromised, an attacker can supply both a malicious binary and matching checksum, defeating integrity verification and leading to arbitrary code execution once the installed binary is run.
echo "Installing ${BINARY} ${tag} for ${target}..."
# Download archive and checksums
curl -sSL "${base_url}/${archive}" -o "${tmpdir}/${archive}"
curl -sSL "${base_url}/checksums.sha256" -o "${tmpdir}/checksums.sha256"
# Verify checksum
The README presents fund-moving commands on mainnet by default, including address funding, channel ordering, invoice creation, and payment, without a clear warning that these actions can spend or receive real funds. For an agent-facing CLI, ambiguity about mainnet default behavior increases the chance of accidental financial loss from mistaken invocation or unsafe testing.
The README explicitly instructs users and agents to initialize a wallet with --no-password, which creates an unencrypted seed, but it does not clearly warn that this exposes the wallet secrets at rest. In an agent context, this is especially dangerous because automation often runs on shared hosts, CI runners, containers, or machines with broader process/file access, making theft of funds substantially easier if the wallet directory is exposed.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Network | Chain Source | Default URL | Blocktank URL |
|---------|-------------|-------------|---------------|
| mainnet | Esplora | `https://blockstream.info/api` | `https://api1.blocktank.to/api` |
| regtest | Electrum | `tcp://127.0.0.1:60001` | `https://api.stag0.blocktank.to/blocktank/api/v2` |
Mainnet also uses [Rapid Gossip Sync](https://docs.rs/lightning-rapid-gossip-sync) for fast graph updates.
The skill exposes extensive shell-driven capabilities for wallet creation, daemon control, networking, and irreversible fund movement, but does not declare any explicit tool scope or allowed-tools boundaries. In an agent setting, this increases the chance that a model can invoke high-risk shell actions without least-privilege constraints or operator review.
The quick start recommends bk init --no-password specifically 'for agent use', normalizing plaintext seed storage for a self-custody wallet. Because the seed is the recovery secret for all funds, any host compromise, log capture, filesystem exposure, or multi-tenant agent environment can lead to full wallet theft.
The example output includes a full mnemonic seed phrase in documentation without an adjacent warning that it is highly sensitive recovery material. In agent workflows, users often copy examples into prompts, logs, tests, or screenshots; normalizing visible seed output greatly increases the likelihood of accidental secret disclosure and total loss of funds.
The send, bump-fee, and cpfp sections describe irreversible on-chain fund-moving operations without strong cautions, confirmation guidance, or safe-preview defaults. In an autonomous agent context, these commands can rapidly move or drain funds to attacker-supplied addresses, and mistakes are generally not reversible.
The pay command supports BOLT11, LNURL, and Lightning Address flows but lacks an explicit warning that successful payment irreversibly spends funds and may reveal metadata to external services during resolution. This is especially dangerous for agent use because untrusted messages or content can embed payment requests that the agent may process automatically.
The daemon API password persists across restarts and is stored on disk, creating a reusable local secret that can be abused by malware, other local users with access, or compromised agent sessions. In a wallet-managing skill, persistent local API credentials materially increase the blast radius because they protect endpoints capable of reading balances and initiating financial actions.
Location: <wallet_dir>/api-password (e.g., ~/.bitkit/api-password)
Format: 32 random bytes encoded as 64 hex characters
Permissions: File mode 0600 (owner read/write only)
# Read the password
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Find install directory
if [ -w /usr/local/bin ]; then
install_dir="/usr/local/bin"
elif [ -d "$HOME/.local/bin" ] || mkdir -p "$HOME/.local/bin" 2>/dev/null; then
install_dir="$HOME/.local/bin"
else
echo "Cannot find writable install directory." >&2
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
install_dir="$HOME/.local/bin"
else
echo "Cannot find writable install directory." >&2
echo "Run with sudo or create ~/.local/bin" >&2
exit 1
fi
This shell script fetches release artifacts from GitHub and installs binaries into /usr/local/bin or ~/.local/bin, which modifies the user's system. Although it prints progress messages, it does not ask for confirmation or provide a clear warning that it will download remote code and place executables on PATH before doing so.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
cd bitkit-docker
docker compose down -v
rm -rf ./lnd ./lnurl-server/data
docker compose up -d
The installation instructions recommend fetching a remote script over the network and piping it directly to sh, which executes unreviewed code immediately with the user's privileges. If the hosting source, repository, network path, or account is compromised, users and agents could be induced to run arbitrary malicious code.
curl -sSL https://raw.githubusercontent.com/synonymdev/bitkit-cli/main/install.sh | sh
Or build from source:
The installation instruction pipes a remotely fetched script directly into sh, which prevents integrity review and makes the environment trust the current contents of a network resource at execution time. If the source repository, distribution path, TLS trust chain, or local network is compromised, arbitrary code can run with the user's privileges.
Bitcoin Lightning payment CLI for agents. Lowest LSP fees. Self-custody wallet with LNURL/Lightning Address support, typed exit codes, JSON envelope output, encrypted Pubky messaging, and daemon mode.
**Install:** `curl -sSL https://raw.githubusercontent.com/synonymdev/bitkit-cli/main/install.sh | sh`
**Binary names:** `bitkit` or `bk` (identical alias)
**Always use:** `--json` flag on every invocation for parseable output.
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.
Location: <wallet_dir>/api-password (e.g., ~/.bitkit/api-password)
Format: 32 random bytes encoded as 64 hex characters
Permissions: File mode 0600 (owner read/write only)
# Read the password
No suspicious patterns detected.