Back to skill

Security audit

Blink

Security checks for vulnerabilities and agentic risk

Overview

The wallet’s powerful payment access is clearly disclosed and supported by user confirmation rules and spending controls.

Start with Read/Receive scopes and test funds. Providing Write access or a Spark seed enables real spending. Confirm recipients and amounts, configure L402 budgets and approved domains, and remember that fees and plain token transfers are outside satoshi limits. After a payment error, inspect stderr and transaction history before retrying. External SDK dependencies were not audited, and no live payments were performed.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (63)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The QR-generation functionality matches the declared purpose, and temporary PNG creation is a supporting implementation detail. However, the unconditional 'All output is JSON' claim is inaccurate: only successful stdout output is JSON, while stderr contains plain text and QR graphics. No unrelated network access, payment execution, or credential access is visible in the supplied chunk; the imported helper implementation is not provided.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Invoice creation is covered by the description, but the script's primary purpose extends beyond wallet invoicing: it issues authorization credentials and constructs server-side payment challenges. An L402 auto-pay client consumes challenges and pays invoices; this script creates those challenges instead. Root-key handling and diagnostic stderr messages are supporting implementation details, not separate capability mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The primary payment functionality fits the declared Lightning/Spark wallet purpose, and using a client-side SDK for non-custodial payments is a supporting implementation detail. However, --token and --from-token accept token identifiers beyond USDB, exposing additional asset-transfer and conversion capabilities not identified in the description. Numerous console.error calls also contradict the unqualified JSON-only output claim. The supplied chunk does not establish unrelated data access or exfiltration; imported helper implementations were not supplied.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The description declares an L402 auto-pay client, whereas this module implements the producer side of L402: minting tokens and validating credentials for access to paid resources. That is a distinct capability beyond paying L402 challenges. Local signing-key storage and cryptographic helpers support that capability and are not independently treated as mismatches. The absence of other wallet features in this individual code chunk is not itself a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The script's primary purpose is to validate credentials submitted by a paying client, not to act as the client or execute wallet payments. This introduces an L402 verifier/authentication role not stated in the description. The optional Blink invoice-status lookup and JSON result output are consistent with the declared wallet functionality. No unrelated data access or exfiltration is evident in the supplied chunk; imported helper implementations were not provided.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 177)May include surrounding context.

md
2. Configure API access from [blink-api-and-auth](references/blink-api-and-auth.md):

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 1625)May include surrounding context.

md
- [blink-api-and-auth](references/blink-api-and-auth.md): API endpoints, authentication, scopes, staging/testnet configuration, and error handling.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/non-custodial.md (reported line 205)May include surrounding context.

md
## The Breez API key (`BREEZ_API_KEY`)

The Breez Spark SDK will not connect without a Breez API key. This is an
access credential for **Breez's infrastructure** — it is NOT custody: it never
touches the seed, cannot sign, and cannot spend. It is per-_application_, not
per-_wallet_, so any valid key works with any seed.

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Confidence
90% confidence
Finding

Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.

Content

Scanner excerpt · scripts/_lnurl.js (reported line 172)May include surrounding context.

js
if (/^f[cd][0-9a-f]{2}:/.test(host)) return true; // fc00::/7 unique-local
  if (/^fe[89ab][0-9a-f]:/.test(host)) return true; // fe80::/10 link-local

  // IPv4-mapped IPv6. `new URL()` re-serialises `::ffff:169.254.169.254` into
  // the hex form `::ffff:a9fe:a9fe`, so matching only the dotted spelling would
  // never fire on anything the guard actually receives.
  const mappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

To use the Blink staging environment (signet) instead of real money:

bash
export BLINK_API_URL="https://api.staging.blink.sv/graphql"

Overrides must be `https://`/`wss://` (plaintext only for literal `localhost`/`127.0.0.1` — regtest/dev), and hosts outside `*.blink.sv` additionally require `BLINK_ALLOW_CUSTOM_AUTH_HOST=1` so the API key cannot be silently pointed at an arbitrary host (v2.6.1). The http→ws auto-downgrade was removed: https API hosts derive wss sockets.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 250)May include surrounding context.

md
blink swap-quote usd-to-btc 500 --unit cents

# Probe an L402-gated URL (discover price without paying)
blink l402-discover https://api.example.com/resource

# Pay for an L402-gated resource (dry-run first)
blink l402-pay https://api.example.com/resource --dry-run

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 253)May include surrounding context.

md
blink l402-discover https://api.example.com/resource

# Pay for an L402-gated resource (dry-run first)
blink l402-pay https://api.example.com/resource --dry-run
blink l402-pay https://api.example.com/resource --max-amount 1000

# List cached L402 tokens

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 254)May include surrounding context.

md
# Pay for an L402-gated resource (dry-run first)
blink l402-pay https://api.example.com/resource --dry-run
blink l402-pay https://api.example.com/resource --max-amount 1000

# List cached L402 tokens
blink l402-store list

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1048)May include surrounding context.

bash
# 1. Discover what the service costs (no payment)
blink l402-discover https://api.example.com/resource
# → shows satoshis, format, macaroon

# 2. Dry-run to confirm price with user before spending

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1052)May include surrounding context.

md
# → shows satoshis, format, macaroon

# 2. Dry-run to confirm price with user before spending
blink l402-pay https://api.example.com/resource --dry-run
# → {"event": "l402_dry_run", "satoshis": 100, ...}

# 3. Check your balance first

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1059)May include surrounding context.

md
blink balance

# 4. Pay (with optional safety limit)
blink l402-pay https://api.example.com/resource --max-amount 500
# → pays invoice, caches token, returns resource data

# 5. Subsequent calls reuse cached token (no re-payment)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1238)May include surrounding context.

md
Token cache location: `~/.blink/l402-tokens.json`

**Origin isolation (v3.0.1):** tokens are keyed by the **origin** (scheme + host + port) + path of the URL that **actually issued the 402**, e.g. `https://api.example.com/v1/data`, and a cached token is only ever sent directly back to that URL. That is not necessarily the URL you passed: if a service redirects the request (even only for some methods, e.g. it answers `HEAD` itself but redirects `GET`), the token belongs to the redirect target, and `l402_paid` reports it as `challengeUrl`. Operator `--header`s are withheld from a different issuing origin, and a `--body` request whose 402 came from a different origin is refused (`URL_POLICY`) before paying. The credentialed retry repeats **exactly the request that received the 402** (same method, headers and body) with the L402 `Authorization` added, and is never rebuilt from your original flags. That includes HTTP redirect rewrites: 301/302 turn `POST` into `GET`, and 303 turns any non-

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1256)May include surrounding context.

json
{
  "url": "https://api.example.com/resource",
  "l402_detected": true,
  "format": "lightning-labs",
  "macaroon": "AgELZXhhbXBsZS...",

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1271)May include surrounding context.

json
{
  "event": "l402_dry_run",
  "url": "https://api.example.com/resource",
  "format": "lightning-labs",
  "invoice": "lnbc1000n1...",
  "satoshis": 100,

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1287)May include surrounding context.

json
{
  "event": "l402_paid",
  "url": "https://api.example.com/resource",
  "format": "lightning-labs",
  "paymentStatus": "SUCCESS",
  "walletId": "abc123",

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1304)May include surrounding context.

json
{
  "event": "l402_paid",
  "url": "https://api.example.com/resource",
  "format": "lightning-labs",
  "paymentStatus": "SUCCESS",
  "walletId": "abc123",

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1063)May include surrounding context.

→ pays invoice, caches token, returns resource data

5. Subsequent calls reuse cached token (no re-payment)

blink l402-pay https://api.example.com/resource

→ {"event": "l402_paid", "tokenReused": true, ...}

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1188)May include surrounding context.

md
Known public L402 endpoints for testing (use specific paths, not root URLs; re-verified live in field test FT7, 2026-11-04):

- `https://api.lightningenable.com/l402/test/ping` — Lightning Labs format, **1 sat**, returns a fixed success message and accepts its token again (the reliable test endpoint). Other paid endpoints live under `https://api.lightningenable.com/l402/proxy/…` (about 2 sats); check each one's required query parameters first, since a missing parameter fails *after* payment. The old `lightningenable.com/api/v1/endpoint/<id>` pattern now returns 404.
- `https://www.l402apps.com/api/apis` — L402 API directory, 10 sats, Lightning Labs format. **Unreliable:** it returned HTTP 500 (`Failed to create Lightning invoice`) throughout FT7.

> Upstream availability shifts: `l402.services` (dead as of 2026-09-12) and `l402.directory` (intermittent 503 during rebuilds) have both been unreachable at times — `l402-search --source 402index` is the reliable directory fallback. Probe w

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1188)May include surrounding context.

md
Known public L402 endpoints for testing (use specific paths, not root URLs; re-verified live in field test FT7, 2026-11-04):

- `https://api.lightningenable.com/l402/test/ping` — Lightning Labs format, **1 sat**, returns a fixed success message and accepts its token again (the reliable test endpoint). Other paid endpoints live under `https://api.lightningenable.com/l402/proxy/…` (about 2 sats); check each one's required query parameters first, since a missing parameter fails *after* payment. The old `lightningenable.com/api/v1/endpoint/<id>` pattern now returns 404.
- `https://www.l402apps.com/api/apis` — L402 API directory, 10 sats, Lightning Labs format. **Unreliable:** it returned HTTP 500 (`Failed to create Lightning invoice`) throughout FT7.

> Upstream availability shifts: `l402.services` (dead as of 2026-09-12) and `l402.directory` (intermittent 503 during rebuilds) have both been unreachable at times — `l402-search --source 402index` is the reliable directory fallback. Probe w