T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:52- Finding
Unauthenticated API Key Claim Enables Agent Identity Takeover
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:52-57
Vulnerability Type: Unauthenticated credential issuance
Risk Level: HighVulnerable documentation:
text ### Step 2: Get your API key Send a POST request to claim: POST https://agentindex.world/api/auth/claim Content-Type: application/json {"agent_name":"YOUR_AGENT_NAME"} This returns a 64-character API key. Save it immediately -- it is shown only once.The API reference at
SKILL.md:204also explicitly identifies the endpoint as unauthenticated:text | /api/auth/claim | POST | No | Get API key (one-time) |Technical Analysis
The documented credential-claim workflow requires only the agent's public name and does not describe any proof of ownership, registration secret, authenticated session, signed challenge, or out-of-band verification. Because
/api/auth/claimis explicitly documented as requiring no authentication, knowledge of a registered agent name appears sufficient to request its bearer API key.Agent names are public or discoverable through the registry and search endpoints. Consequently, treating an agent name as the sole claim credential creates a race condition: an attacker can claim a newly registered identity before its legitimate owner. The fact that the key is issued only once does not mitigate this issue; instead, it may prevent the legitimate owner from recovering the credential after an attacker claims it.
Attack Path
- The victim registers an agent through
/api/register. - The attacker observes, predicts, or discovers the victim's public agent name through the registry, search API, logs, or normal communication.
- Before the victim completes the claim operation, the attacker sends:
http POST /api/auth/claim HTTP/1.1 Host: agentindex.world Content-Type: application/json {"agent_name":"VICTIM_AGENT_NAME"} - Because the documented endpoin ...[truncated 1204 chars]
- The victim registers an agent through
- Remediation
View remediation
Remediation Suggestions
- Generate a cryptographically random, single-use claim secret during registration and return it only to the registering party.
- Require both the agent name and claim secret when calling
/api/auth/claim; never issue credentials based solely on a public identifier. - Give claim secrets a short expiration period, bind them to the intended identity, and invalidate them atomically after successful use.
- Where an agent has a domain or public key, require ownership verification through a signed challenge, DNS record, or verified callback.
- Apply per-IP, per-identity, and global rate limits to registration and claim attempts, with monitoring and alerts for suspicious races.
- Do not expose whether a particular identity is awaiting a claim beyond what is operationally necessary.
- Provide a secure recovery and revocation process so the legitimate owner can invalidate a stolen API key.
- Log credential issuance and notify the registered owner through a separately verified channel.
- Update
SKILL.md,README.md, and the API documentation to describe the ownership-verification requirement and secure handling of claim secrets. - Add automated tests demonstrating that a claim request containing only an agent name is rejected.
