T09 · Insecure Skill Coding Practices
- Location
scripts/minimax_media.py:17- Finding
API Credentials and User Content Can Be Sent to an Unrestricted Configurable Endpoint
- Content
View full analysis
dict: url = f"{BASE_URL}/v1/image_generation" headers = { 'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json' } payload = { 'model': 'image-01', 'prompt': prompt } resp = requests.post(url, headers=headers, json=payload, timeout=60) ``` The same destination and authorization pattern is also used by the TTS implementation at lines 61–80. ### Technical Analysis The Skill must send an API credential and user-provided content to MiniMax to perform its declared image-generation function. That network access is necessary when the destination is the official MiniMax service. However, `MINIMAX_BASE_URL` is accepted without validating its scheme or hostname. The value directly controls the destination receiving the `Authorization: Bearer` header, image prompts, and TTS text. If an attacker can manipulate the process environment or deployment configuration, the attacker can redirect these values to an arbitrary server. This exceeds the minimum privileges needed by the declared functionality. The Skill only needs to contact the official MiniMax HTTPS API, not an unrestricted environment-selected destination. The TTS capability also expands the types of user content transmitted and is not declared in `README.md` or `SKILL.md`. ### Attack Path 1. An attacker gains influence over the environment or launch configuration used to run the Skill. 2. The attacker sets `MINIMAX_BASE_URL` to an attacker-controlled endpoint, such as `https://attacker.example`. 3. A user i ...[truncated 848 chars]- Remediation
View remediation
