docx

Warn

Audited by Gen Agent Trust Hub on Sep 4, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The skill performs runtime compilation and process injection to enable LibreOffice functionality in restricted environments.
  • In scripts/office/soffice.py, the skill defines a C source string (_SHIM_SOURCE) that intercepts system-level socket calls.
  • It writes this source to a temporary file (lo_socket_shim.c) and executes gcc to compile it into a shared library (lo_socket_shim.so).
  • It then uses the LD_PRELOAD environment variable to inject this library into the LibreOffice (soffice) process to shim AF_UNIX socket behavior.
  • In scripts/accept_changes.py, the skill dynamically generates a LibreOffice StarBasic macro (ACCEPT_CHANGES_MACRO) and writes it to a configuration directory before execution.
  • [COMMAND_EXECUTION]: The skill relies heavily on executing external system binaries via subprocess.run across several scripts.
  • scripts/office/soffice.py executes gcc to compile its shim and soffice to process documents.
  • scripts/accept_changes.py executes soffice with headless flags and custom environment variables.
  • scripts/office/validators/redlining.py executes git diff with word-diff parameters to perform document comparison.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted .docx files and parses their internal XML structure, which represents an attack surface.
  • Ingestion points: .docx files are unpacked and their XML content is processed by multiple scripts in the scripts/office/ directory.
  • Boundary markers: The skill includes extensive validation logic in scripts/office/validators/ and utilizes defusedxml in many components to mitigate standard XML attacks.
  • Capability inventory: The skill has the capability to read/write local files and execute multiple system-level subprocesses.
  • Sanitization: Analysis shows a mix of defusedxml (safe) and standard xml.etree.ElementTree or lxml (potentially vulnerable if not configured strictly) across various scripts.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 4, 2026, 03:04 PM
Security Audit — agent-trust-hub — docx