docx

Warn

Audited by Gen Agent Trust Hub on Jun 14, 2026

Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The skill employs dynamic code generation and process injection techniques to handle document conversion.
  • Runtime Compilation: The script scripts/office/soffice.py hardcodes C source code, writes it to a temporary file, and compiles it at runtime using gcc. The resulting shared object is then loaded into the execution environment via LD_PRELOAD to shim socket system calls.
  • Macro Injection: scripts/accept_changes.py dynamically creates a LibreOffice Basic macro and installs it into a temporary user profile to automate document modification tasks.
  • [COMMAND_EXECUTION]: Multiple components execute system binaries and shell commands via the subprocess module.
  • System Tools: Scripts invoke external binaries including gcc for compilation, soffice (LibreOffice) for document processing, git for text diffing, and pdftoppm for image conversion.
  • Scope: Command execution is used extensively across scripts/office/soffice.py, scripts/accept_changes.py, and scripts/office/validators/redlining.py.
  • [EXTERNAL_DOWNLOADS]: The skill instructions specify requirements for third-party libraries and software.
  • Node.js Dependencies: SKILL.md requires the global installation of the docx library via npm install -g docx.
  • System Dependencies: The skill relies on external tools being present in the environment, specifically pandoc, LibreOffice, and Poppler.
  • [PROMPT_INJECTION]: The skill architecture is susceptible to indirect prompt injection through document ingestion.
  • Ingestion Points: scripts/office/unpack.py extracts raw XML and text from user-provided documents and integrates it into the agent's context.
  • Boundary Markers: Document content is processed without protective delimiters or instructions for the agent to disregard embedded commands.
  • Capability Inventory: The agent's access to high-privilege tools (Bash, subprocess execution) creates a risk should malicious instructions be found in the ingested document data.
  • Sanitization: No sanitization or safety filtering is performed on the extracted XML content before processing.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jun 14, 2026, 08:50 AM
Security Audit — agent-trust-hub — docx