Back to skill

Security audit

SwarmRecall Pools

Security checks for vulnerabilities and agentic risk

Overview

The skill clearly supports shared SwarmRecall pools, but an unguarded custom API URL setting could send its API key to an unintended server.

Install only if you trust SwarmRecall with the data you place in shared pools. Before use, ensure SWARMRECALL_API_URL is unset or points only to the legitimate trusted service, rotate the API key if it may have been exposed, and get explicit consent before storing personal or sensitive content in shared pools.

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:35
Finding

Environment-Controlled API URL Can Expose the Bearer Credential

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 35–41
Vulnerability Type: Credential exposure through an untrusted API endpoint override
Risk Level: High

Vulnerable Code

markdown
## Authentication

All API requests require:

Authorization: Bearer <SWARMRECALL_API_KEY>

text

## API Base URL

`https://swarmrecall-api.onrender.com` (override with `SWARMRECALL_API_URL` if set)

Technical Analysis

The skill directs the agent to use the value of SWARMRECALL_API_URL as the API base URL whenever that environment variable is set. It also directs the agent to include SWARMRECALL_API_KEY as a bearer credential in all API requests.

No origin validation, HTTPS enforcement, host allowlist, redirect restriction, or explicit user approval requirement is specified for the override. Consequently, an attacker who can influence the agent's environment could set SWARMRECALL_API_URL to an attacker-controlled endpoint. If the agent follows these instructions, authenticated requests would disclose the bearer credential to that endpoint.

This is an insecure configuration practice rather than evidence of intentionally malicious behavior.

Attack Path

  1. An attacker gains the ability to influence the environment used to run the agent, such as through a compromised project configuration, shell profile, CI configuration, or parent process.
  2. The attacker sets SWARMRECALL_API_URL to an endpoint under the attacker's control.
  3. The skill instructs the agent to use that endpoint as the API base URL.
  4. The agent sends a request containing:
    http
    Authorization: Bearer &lt;SWARMRECALL_API_KEY&gt;
    
  5. The attacker-controlled server records the bearer credential.
  6. The attacker reuses the credential against the legitimate SwarmRecall API, subject to the credential's scopes and validity.

Impact Assessment

Successful exploitation could disclose the SwarmRecall API key. The attacker could exercise the permissions gr ...[truncated 460 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove support for SWARMRECALL_API_URL unless custom endpoints are operationally necessary.
  2. If overrides are required, validate the parsed URL against an explicit allowlist of trusted origins.
  3. Require HTTPS and reject URLs containing user information, unexpected ports, IP-literal hosts, fragments, or non-allowlisted hostnames.
  4. Do not attach Authorization headers to requests whose scheme, hostname, or port differs from the approved origin.
  5. Disable automatic redirects for authenticated requests, or strip credentials and revalidate the destination before following any redirect.
  6. Require explicit user confirmation before sending credentials to a non-default endpoint.
  7. Apply narrowly scoped, short-lived API credentials and provide a documented revocation and rotation procedure.
  8. Treat environment variables as untrusted configuration and fail closed when endpoint validation fails.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep