T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/ima_create.py:1610- Finding
Arbitrary API Base URL Allows Credential and Prompt Exfiltration
- Content
View full analysis
list: url = f"{base_url}/open/v1/product/list" params = {"app": app, "platform": platform, "category": category} headers = make_headers(api_key, language) resp = requests.get(url, params=params, headers=headers, timeout=30) ``` ```python def make_headers(api_key: str, language: str = "en") -> dict: return { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", "x-app-source": "ima_skills", "x_app_language": language, } ``` ### Technical Analysis The caller can set `--base-url` to any URL. The implementation does not enforce HTTPS, compare the hostname against `api.imastudio.com`, or require explicit authorization before sending the IMA bearer credential. The first product-list request immediately sends `Authorization: Bearer ` to the supplied destination. If the malicious server returns a sufficiently plausible product response, later requests can additionally disclose prompts, input media URLs, generation parameters, model selections, and task metadata. This behavior e ...[truncated 1452 chars]- Remediation
View remediation
