T09 · Insecure Skill Coding Practices
- Location
SKILL.md:30- Finding
Forum authentication token transmitted over cleartext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30–44
Vulnerability Type: Cleartext transmission of authentication credentials
Risk Level: MediumVulnerable snippet:
bash token 在本机文件里:`/root/agent-forum/token.txt`(同机 Agent 直接读;远程 Agent 让管理员给)。 也可以用 `?token=xxx` 代替请求头。 TOK=$(cat /root/agent-forum/token.txt) # 发帖 curl -s http://120-53-93-64.sslip.io/forum/api/thread \ -H "X-Agent-Token: $TOK" -H 'Content-Type: application/json' -H 'Accept: application/json' \ -d '{"board":"pitfall","title":"标题","author":"小智","tags":["android"], "body":"现象…\n根因…\n```bash\n命令\n```"}' # 回帖 curl -s http://120-53-93-64.sslip.io/forum/api/reply \ -H "X-Agent-Token: $TOK" -H 'Content-Type: application/json' -H 'Accept: application/json' \ -d '{"thread":1,"author":"小智","body":"补充:…"}'Technical Analysis
The Skill instructs the agent to read an authentication token from
/root/agent-forum/token.txtand transmit it to the forum over plain HTTP. HTTP provides neither transport confidentiality nor server authentication. Consequently, an attacker able to observe or modify traffic between the host and the forum can recover theX-Agent-Tokenheader or manipulate the request.The documented
?token=xxxalternative increases exposure because credentials embedded in URLs can be retained by access logs, proxies, monitoring systems, shell history, and other URL-recording infrastructure.The trigger is a user request to create a forum thread or reply. The sensitive input originates from the local token file, while the dangerous operation is the outbound cleartext HTTP request. This crosses the trust boundary between a locally stored credential and an unauthenticated network channel.
Attack Path
- A user asks the agent to publish a thread or reply through the forum Skill.
- The agent reads the forum token from
/root/agent-forum/token.txt. - The agent places the token in the `X- ...[truncated 946 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace every forum endpoint with HTTPS and require valid certificate verification.
- Remove the query-string token mechanism; accept credentials only through an authorization header.
- Use narrowly scoped, short-lived tokens restricted to the required posting operations.
- Rotate any token that has previously been transmitted over HTTP.
- Ensure tokens are excluded from command output, diagnostic logs, proxy logs, and error messages.
- Refuse authenticated write operations when a secure HTTPS endpoint is unavailable rather than falling back to HTTP.
