Back to skill

Security audit

Binance Spot

Security checks for vulnerabilities and agentic risk

Overview

This Binance Spot skill is purpose-aligned but asks agents to persist exchange API credentials in plaintext and can perform real trading actions, so users should review it carefully before installing.

Install only if you are comfortable giving the agent access to Binance Spot credentials and possible real trading actions. Prefer testnet or demo, use least-privilege keys with withdrawals disabled and IP allowlisting, and do not store real API keys or secrets in TOOLS.md or repository files; use a dedicated secret manager instead.

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:232
Finding
Plaintext Storage of Binance API Credentials## Vulnerability Details **File Location**: `SKILL.md`, lines 232–239, 278–296, and 309–315 **Vulnerability Type**: Plaintext sensitive credential storage **Risk Level**: High ### Vulnerable Code Snippets ```markdown Users can provide Binance API credentials by sending a file where the content is in the following format: ```bash abc123...xyz secret123...key ``` ``` ```markdown ### TOOLS.md Structure ```bash ## Binance Accounts ### main - API Key: abc123...xyz - Secret: secret123...key - Testnet: false - Description: Primary trading account ### testnet-dev - API Key: test456...abc - Secret: testsecret...xyz - Testnet: true - Description: Development/testing ### futures-keys - API Key: futures789...def - Secret: futuressecret...uvw - Testnet: false - Description: Futures trading account ``` ``` ```markdown ## Adding New Accounts When user provides new credentials: * Ask for account name * Ask: Mainnet, Testnet or Demo * Store in `TOOLS.md` with masked display confirmation ``` ### Technical Analysis The skill instructs users to submit raw Binance API credentials and directs the agent to persist those credentials in a Markdown file named `TOOLS.md`. Although the displayed confirmation is masked, the underlying stored values remain plaintext. Display masking therefore provides no protection against filesystem access. Any process, tool, agent session, backup system, repository operation, or user with access to the workspace could read and recover the credentials. Markdown files are also likely to be copied, indexed, included in diagnostic output, or accidentally committed to version control. The credentials are intended to sign authenticated Binance requests. Consequently, disclosure of the secret key enables an attacker to generate valid signatures and exercise every capability granted to that API key. ### Attack Path 1. A user supplies a Binance API key and secret to the skill. 2. Following the documented instructions, the agent writes both values ...[truncated 1098 chars]
Remediation
## Remediation Suggestions 1. Do not store API keys, secret keys, or private signing keys in `TOOLS.md`, other Markdown files, source files, logs, or ordinary workspace configuration. 2. Integrate with an operating-system keychain, hardware-backed credential store, or dedicated secret-management service. 3. Store only a non-sensitive account identifier in skill configuration and resolve the corresponding credential from the secure store at request time. 4. Keep secret values in memory only for the minimum period required to sign a request, and clear temporary buffers where supported. 5. If temporary file storage is unavoidable, use a file outside the repository with owner-only permissions, encryption at rest, restrictive lifecycle controls, and guaranteed deletion. 6. Add secret-bearing files to version-control ignore rules and deploy secret-scanning controls in local and CI workflows. 7. Never include credentials in prompts, command output, error messages, telemetry, or logs. Display masking must be treated only as an additional presentation safeguard, not as storage protection. 8. Recommend and validate least-privilege Binance keys where feasible: enable only required trading permissions, disable withdrawals, configure IP allowlists, use separate credentials per environment, and prefer testnet credentials during development. 9. Rotate any credentials that were previously stored according to the documented plaintext format.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill explicitly instructs storing newly provided API credentials in TOOLS.md without warning about persistence, repository exposure, or the consequences of secret compromise. Binance API keys can enable account access and potentially trading activity, so writing them to a local file creates a severe secret-handling vulnerability with direct financial risk.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill supports live trading and account-modifying endpoints but provides only a narrow confirmation requirement for mainnet transactions, without a broader safety model for destructive actions, irreversible financial loss, or accidental environment misuse. In a trading context, weak safety prompting can lead to unintended orders, cancellations, or actions on real funds.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill goes beyond making Binance Spot API requests and instructs the agent to collect, retain, and manage Binance API credentials in local account records and files. Persisting exchange credentials materially increases the blast radius of compromise because secrets may be exposed through logs, workspace access, prompt leakage, or later unintended retrieval.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The manifest advertises a request skill, but the documented behavior expands into persistent account registry management, account selection defaults, credential intake, and storage workflows. This scope expansion creates an unnecessary secret-management subsystem inside a trading skill, increasing the chance of unauthorized use, secret disclosure, and execution against the wrong account.

External Transmission

Medium
Category
Data Exfiltration
Content
Request:
```bash
curl -X POST "https://api.binance.com/api/v3/order" \
  -H "X-MBX-APIKEY: your_api_key" \
  -H "User-Agent: binance-spot/1.0.1 (Skill)" \
  -d "symbol=BTCUSDT&side=BUY&type=MARKET&quantity=0.001&timestamp=1234567890123&signature=..."
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Request:
```bash
curl -X POST "https://api.binance.com/api/v3/order" \
  -H "X-MBX-APIKEY: your_api_key" \
  -H "User-Agent: binance-spot/1.0.1 (Skill)" \
  -d "symbol=BTCUSDT&side=BUY&type=MARKET&quantity=0.001&timestamp=1234567890123&signature=..."
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Scope Creep

Low
Category
Excessive Agency
Content
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Intent-Code Divergence

Low
Confidence
87% confidence
Finding
The document says keys should never be revealed, yet it embeds a Binance Accounts section with API key/secret fields and an example TOOLS.md structure containing full secret-format entries. Even as placeholders or templates, this normalizes storing secrets in documentation-linked files and increases the likelihood that real credentials will be inserted, committed, or exposed.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:295