T09 · Insecure Skill Coding Practices
- Location
SKILL.md:132- Finding
Authentication Cookie May Be Exposed Through an Unvalidated Download URL
- Content
View full analysis
-b "" "" ``` ``` ### Technical Analysis The Skill directs the Agent to pass an authentication cookie to a download URL supplied by the Weiyun MCP response. It also enables automatic redirect following through `curl -L`. The instructions do not require validation of the initial URL or each redirect destination against an explicit trusted-host allowlist. Merely requiring an HTTPS URL would not be sufficient because an attacker-controlled host can also provide valid HTTPS. If the MCP response is compromised, spoofed, or manipulated, it could provide an attacker-controlled URL or redirect chain. Depending on `curl` cookie processing and the supplied cookie format, sensitive cookie material may be transmitted outside the intended Weiyun service. At minimum, the command allows untrusted service output to control a credential-bearing network request. ### Attack Path 1. An attacker compromises or impersonates the MCP endpoint, or otherwise manipulates the response returned to the Agent. 2. The malicious response supplies an attacker-controlled `https_download_url`, either directly or through an HTTP redirect. 3. The Agent follows the Skill instructions and executes `curl` with the returned cookie and URL. 4. The request follows redirects because `-L` is enabled. 5. Cookie material may be disclosed to attacker-controlled infrastructure, enabling unauthorized use within the scope granted by that cookie. ### Impact Assessment Successful exploitation may disclose a temporary or persistent download authentication cookie. The resulting privileges depend on the cookie's server-side scope and lifetime. Potential impact includes unauthorized acc ...[truncated 257 chars]- Remediation
View remediation
