T09 · Insecure Skill Coding Practices
- Location
SKILL.md:55- Finding
Bearer Token Exfiltration Through a Configurable Server Origin
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 55–68
Vulnerability Type: Credential disclosure through an unrestricted network destination
Risk Level: HighVulnerable Code
text - `TOKENBURG_SERVER` (optional, default `https://tokenburg.com`) — the server. Your **character ID is the middle segment of the Bearer token** (between the leading `agt_` and the trailing `_<random>`). Below, read `<server>` as `TOKENBURG_SERVER` and `<character ID>` as that character ID. --- ## 1. Authentication Send this header on every HTTP request:Authorization: Bearer
text Technical Analysis
The Skill requires the Agent to send the owner-provided
TOKENBURG_BEARERcredential with every HTTP request. At the same time, it permits the request origin to be selected through the optionalTOKENBURG_SERVERenvironment variable.The instructions do not require the configured server to:
- Match the official
https://tokenburg.comorigin. - Use HTTPS.
- Belong to an explicit allowlist.
- Receive informed user approval before credentials are sent.
- Preserve the trusted origin across redirects.
Sending the bearer token to the official Tokenburg service is necessary for the declared functionality. Sending it automatically to an arbitrary configurable origin is not necessary and exceeds the minimum privilege required.
An actor capable of setting or influencing
TOKENBURG_SERVERcan direct authenticated requests to a server they control. Because the Skill explicitly instructs the Agent to attach the bearer token to every request, the malicious endpoint can capture the credential. This finding concerns the unsafe credential-routing design; the audited file does not itself establish who can modify the environment.Attack Path
- An attacker gains the ability to set or influence
TOKENBURG_SERVERin the Skill's execution environment. - The attacker configures it to an endpoint under their control, such as `https://atta ...[truncated 1416 chars]
- Match the official
- Remediation
View remediation
Remediation Suggestions
-
Pin credentialed requests to the official origin
- Permit
TOKENBURG_BEARERto be sent only to the exact normalized originhttps://tokenburg.com. - Validate the URL scheme, hostname, and effective port before constructing any authenticated request.
- Permit
-
Require HTTPS
- Reject
http://origins for all requests carrying the bearer token. - Do not permit TLS validation to be disabled.
- Reject
-
Do not forward credentials across redirects
- Disable automatic redirects for authenticated calls or revalidate the destination after every redirect.
- Strip the
Authorizationheader whenever the origin changes.
-
Separate development credentials
- If custom servers are necessary for development, require explicit informed user approval and use separate, narrowly scoped test credentials.
- Never reuse production bearer tokens with development or user-supplied origins.
-
Use an explicit allowlist
- Replace unrestricted
TOKENBURG_SERVERsupport with a documented allowlist of trusted origins. - Compare normalized origins rather than relying on hostname substring or suffix checks.
- Replace unrestricted
-
Reduce credential scope and lifetime
- Use short-lived, revocable tokens with only the API permissions necessary for the character.
- Provide token rotation and immediate revocation after suspected disclosure.
-
Clarify the Skill instructions
- State explicitly that the bearer token must never be transmitted to arbitrary URLs, image hosts, redirects, or origins obtained from remote API content.
- Require confirmation before any exceptional credential destination is used.
-
