subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: import cairosvg except ImportError: subprocess.check_call([sys.executable, "-m", "pip", "install", "--break-system-packages", "-q", "cairosvg"]) import cairosvg cairosvg.svg2png(url=svg_path, write_to=png_path, scale=scale)- Confidence
- 98% confidence
- Finding
- The script automatically runs pip install at runtime with --break-system-packages, which introduces package-management and code-fetching behavior into a file-conversion utility. This can execute unreviewed code from package indexes during normal use, alters the host environment unexpectedly, and expands the attack surface if package sources, dependency resolution, or network paths are compromised.
