T09 · Insecure Skill Coding Practices
- Location
SKILL.md:18- Finding
Hardcoded aria2 RPC Secret Exposes Download-Service Control
- Content
View full analysis
` 或配置环境变量 - **下载目录**: 根据主机情况调整 ## 添加下载任务 ### 磁力链接或 HTTP ```bash # 请将 替换为实际密钥 curl -s http://localhost:6800/jsonrpc -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"1","method":"aria2.addUri","params":["token:e603c18b871468e81ec2b2458d3356e5",[""]]}' ``` ``` The same credential is also embedded in all other documented RPC operations, including torrent submission, task enumeration, status queries, pause, resume, removal, and version checks. ### Technical Analysis The Skill claims that users should supply `` or use an environment variable, but its operational examples instead contain the fixed secret: ```text e603c18b871468e81ec2b2458d3356e5 ``` Publishing a reusable authentication secret in Skill instructions exposes it to everyone who can read the package. It may also be copied into generated commands, shell history, Agent logs, and conversation transcripts. If a deployed aria2 instance uses this credential, possession of the Skill is sufficient to authenticate to that service. The commands submit the credential through `http://localhost:6800`, without transport encryption. Loopback binding limits network exposure when correctly enforced, but the credential can still be observed in process activity, logs, command history, or by local processes. The risk increases substantially if aria2 is bound to a non-loopback interface, exposed through a container port, or forwarded through a reverse proxy. ### Attack Path 1. An attacker obtains the published Skill file, a transcript containing one of its commands, or shell history generated from the instructions. 2. The ...[truncated 1063 chars]- Remediation
View remediation
