subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not converter: return None try: subprocess.run( [converter, "--headless", "--convert-to", "pdf", "--outdir", str(local_path.parent), str(local_path)], check=True, stdout=subprocess.DEVNULL,- Confidence
- 89% confidence
- Finding
- The code invokes LibreOffice/soffice on attacker-controlled OFD attachments received from email. Even though subprocess is called without a shell, passing untrusted document content into a large document-conversion binary expands the attack surface to known parser/converter vulnerabilities and can enable local code execution or file access in the conversion process.
