Back to skill

Security audit

AgentFuel API

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent AgentFuel API guide, but it normalizes putting a paid-service API key in URLs and includes crypto-funded credit actions without enough guardrails.

Review this carefully before installing. Use header-based authorization only, avoid putting real AgentFuel keys in URLs or prompts, rotate any key already used in a query-string URL, and manually confirm invoice amounts, token network, recipient key, and transfer amount before any payment or credit transfer.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:31
Finding
Bearer Credential Exposure Through URL Query Parameters and API Responses<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 31-37 and 41-45 **Vulnerability Type**: Authentication credential exposure **Risk Level**: High ### Vulnerable Code ```text **With query param (web_fetch — no custom headers needed):** ``` web_fetch: https://agentfuel.dev/v1/balance?key=YOUR_AF_KEY ``` Returns: `{ "credits": 12500, "key": "af_..." }` ``` ```text **With query param (web_fetch):** Use `web_fetch` with POST isn't supported — use the invoice endpoint via query param: ``` web_fetch: https://agentfuel.dev/v1/invoice?key=YOUR_AF_KEY&amount_usd=10 ``` ``` ### Technical Analysis The Skill explicitly recommends passing `AGENTFUEL_KEY`, a bearer credential controlling paid API credits, in URL query parameters. Query strings are frequently recorded by client histories, tool-call transcripts, proxy and server access logs, monitoring platforms, analytics systems, and error reports. HTTPS protects the URL while it is in transit but does not prevent disclosure through these endpoint and intermediary records. The documented balance response also returns the key in its response body. This unnecessarily reproduces the credential in agent output, execution logs, and conversation history. Possession of the key appears sufficient to authenticate paid API requests and credit transfers; therefore, any exposed copy functions as a reusable bearer token. This behavior is unnecessary for the declared gateway functionality because the Skill already documents authentication through the `Authorization: Bearer` header. Recommending query authentication solely because a particular tool cannot set headers weakens credential handling beyond minimum necessary privileges. ### Attack Path 1. A user follows the documented `web_fetch` example and substitutes a valid `af_` credential into the URL. 2. The complete URL is retained in tool history, agent transcripts, proxy logs, server access logs, telemetry, or an error report. 3. Alternatively, the balan ...[truncated 1232 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all examples that place `AGENTFUEL_KEY` in a URL query parameter. 2. Require authentication exclusively through the HTTP `Authorization: Bearer` header. 3. If `web_fetch` cannot set custom headers, explicitly state that it is unsupported for authenticated endpoints rather than providing a less secure workaround. 4. Change the balance response so it never returns the complete credential. Omit the key or return only a safely masked identifier, such as `af_…last4`. 5. Configure the gateway, reverse proxies, monitoring systems, and analytics tools to redact authorization headers and credential-shaped values. 6. Reject or deprecate query-string authentication server-side after a migration period. 7. Rotate any key previously used in a query-string URL or exposed in endpoint output. 8. Add explicit documentation warning users not to include credentials, private data, or regulated information in logged URLs or prompts. 9. Apply narrowly scoped keys, spending limits, transfer restrictions, and revocation controls to reduce the impact of future disclosure. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill explicitly recommends passing the AgentFuel API key in the URL query string for web_fetch usage. Query-string secrets are commonly exposed through browser history, server/access logs, analytics, referrers, proxy logs, and agent/tool traces, so this materially increases the chance of credential disclosure.

Ssd 3

Medium
Confidence
99% confidence
Finding
The documentation encourages placing a real API key in a request URL, which is especially risky in natural-language agent workflows where URLs may be echoed back to the user, stored in transcripts, or captured by observability systems. This can directly leak the credential and enable unauthorized use of the linked paid service balance.

External Transmission

Medium
Category
Data Exfiltration
Content
**With header auth (curl/exec):**
```bash
curl https://agentfuel.dev/v1/balance \
  -H "Authorization: Bearer $AGENTFUEL_KEY"
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Ssd 3

Medium
Confidence
97% confidence
Finding
The examples normalize use of the real af_ key in query-parameter URLs for invoice-related requests. In agent environments, these full URLs may appear in prompts, tool traces, exception messages, screenshots, or logs, exposing a reusable credential tied to billable resources.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill documents creating USDT invoices and transferring credits between keys without prominent warnings that these are financial actions and may be irreversible. In an agent context, this can lead users or automated workflows to trigger deposits or transfers without understanding the consequences, increasing the risk of fund loss or unauthorized spend.

Static analysis

No suspicious patterns detected.