T09 · Insecure Skill Coding Practices
- Location
SKILL.md:365- Finding
Reusable API Key Exposed in Checkout URLs and Telegram Deep Links
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 365-396
Vulnerability Type: Credential exposure through URL paths and third-party deep links
Risk Level: HighVulnerable Code
markdown | **NOWPayments crypto** | `/checkout/{api_key}/{credits}` — 350+ coins (BTC, ETH, USDT, SOL, ...). Packages: 100/$3, 500/$15, 1000/$30, 5000/$150. | Any cryptocurrency |markdown https://t.me/vastr_bot?start=pay_{api_key}_{stars}markdown GET https://api.moon-bot.cc/checkout/{api_key}/{credits}Technical Analysis
The Skill instructs agents to place a reusable API key directly into URL paths and Telegram deep-link parameters. This conflicts with the safer authentication pattern documented elsewhere in the same file, where the key is transmitted in the
X-API-Keyrequest header.URLs are commonly retained or processed by:
- Browser history and synchronized browsing data
- Web server, reverse-proxy, CDN, and API gateway access logs
- Monitoring, analytics, and error-reporting systems
- Messaging platforms and automatic link-preview services
- Network security products and endpoint telemetry
- Screenshots, copied messages, support records, and chat exports
The Telegram payment flow additionally sends the API key to
t.meand exposes it in a user-visible message. Because the documentation states that the same API key is used in theX-API-Keyheader for authenticated API requests, disclosure may allow replay outside the intended payment transaction.Credential transmission is necessary for authenticated API access, but embedding a reusable credential in a URL is not the minimum privilege required. A short-lived, single-purpose payment token would provide the required account association without disclosing the primary API credential.
Attack Path
- An agent obtains or registers a valid
PANCHANGA_API_KEY. - Following the Skill instructions, the agent substitutes t ...[truncated 1450 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the API key from all URL paths, query parameters, Telegram deep links, and user-visible messages.
- Authenticate checkout creation through an HTTPS request carrying the key in an
AuthorizationorX-API-Keyheader. - Have the server return a cryptographically random payment-session token that is:
- Single-purpose and usable only for payment
- Bound to the intended account, payment amount, and credit quantity
- Short-lived and automatically expired
- Single-use and invalidated after successful payment
- Insufficient to call ordinary authenticated API endpoints
- Put only this restricted payment-session token in Telegram or checkout URLs.
- Redact credentials and payment tokens from application, proxy, CDN, analytics, and monitoring logs.
- Disable automatic link previews for sensitive payment links where supported.
- Rotate API keys previously placed in these URLs and provide users with a documented revocation mechanism.
- Monitor for replay, anomalous credit consumption, and use of API keys from unexpected clients or locations.
- Update all examples to use a flow such as:
http POST /checkout X-API-Key: pnc_REDACTED Content-Type: application/json {"credits": 1000}The response should contain a restricted checkout URL that does not reveal the reusable API key.
