T09 · Insecure Skill Coding Practices
- Location
workflow_enhanced.py:115- Finding
Unrestricted Outbound Requests Enable SSRF and Attacker-Directed Data Transmission
- Content
View full analysis
str: """获取URL内容""" print(f"🌐 请求: {url}") try: import requests resp = requests.get(url, timeout=30) resp.encoding = encoding or resp.apparent_encoding return resp.text except Exception as e: print(f"请求失败: {e}") return "" ``` ### Technical Analysis Both functions make network requests to caller-supplied URLs without validating the destination. There is no restriction on URL schemes, destination hosts, resolved IP addresses, ports, or redirects. In particular, the code does not reject loopback, private, reserved, or link-local addresses. `WebhookTrigger.call_webhook()` presents the greater exposure because it also permits caller-controlled HTTP methods, headers, and JSON bodies. It has no request timeout or response-size restriction. Consequently, data passed to this function can be transmitted to any destination reachable from the host. Network access is consistent with the Skill's advertised scraping, webhook, and AI integration functionality. However, unrestricted access to arbitrary internal and external destinations exceeds the minimum privilege necessary for those features. The implementation should limit requests to explicitly approved destinations. The code does not independently enumerate credentials or automatically transmit local files. Exploitation requires untrusted input to influence the UR ...[truncated 1482 chars]- Remediation
View remediation
