os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
from docx.enum.table import WD_TABLE_ALIGNMENT except ImportError: print("Error: python-docx not installed. Installing...") os.system("pip install python-docx") from docx import Document from docx.shared import Inches, Pt, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH- Confidence
- 98% confidence
- Finding
- The script invokes a shell command at runtime to install a package with os.system("pip install python-docx"). Even though the command string is static, executing package installation during normal document generation expands the attack surface to shell execution and unpinned remote dependency retrieval, which can lead to supply-chain compromise or unintended code execution in the environment.
