subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
member = cfg["member_name"] title = f"👤 {member}: {status_text}" r = subprocess.run( ['python3', cal_script, 'search', f'👤 {member}', '-c', target], capture_output=True, text=True )- Confidence
- 80% confidence
- Finding
- The code passes config- and data-derived values such as member name and calendar name into another script via subprocess without validation. Although shell injection is avoided by using an argument list, this still creates an argument-injection/trust-boundary issue if the downstream icloud_calendar.py interprets crafted values as options, queries, or destructive selectors.
