subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
(is_accessible: bool, status_code_or_error: str) """ try: result = subprocess.run( [ 'curl', '-s', '-o', '/dev/null', '-w', '%{http_code}',- Confidence
- 91% confidence
- Finding
- The script invokes curl on a user-supplied URL to verify accessibility before submission. Although it avoids shell injection by passing an argument list to subprocess.run, it still performs outbound network access to arbitrary destinations, which can be abused for SSRF-style access to internal services, cloud metadata endpoints, or other restricted network locations reachable from the runtime environment.
