subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
from docx.oxml.ns import qn except ImportError: import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "python-docx", "-q"]) from docx import Document from docx.shared import Pt, Inches, Cm, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH- Confidence
- 98% confidence
- Finding
- The code invokes pip at runtime via subprocess to install python-docx if the import fails. Even though the package name is hardcoded, executing package installation during normal skill operation expands the attack surface, performs network-dependent code acquisition, and can run arbitrary installer code without user approval.
