subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not office_bin: raise PreprocessError("libreoffice/soffice not found for office document conversion.") with tempfile.TemporaryDirectory(prefix="med-skill-preprocess-") as tmp_dir: proc = subprocess.run( [office_bin, "--headless", "--convert-to", "txt:Text", "--outdir", tmp_dir, str(path)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False, )- Confidence
- 76% confidence
- Finding
- The code invokes LibreOffice/soffice to convert untrusted office documents. While there is no shell injection, feeding attacker-supplied documents into complex external converters increases exposure to parser exploits, macro-related behaviors, or denial-of-service in the host environment, especially in an agent skill that may process arbitrary uploads.
