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 executesgccto compile it into a shared library (lo_socket_shim.so). - It then uses the
LD_PRELOADenvironment 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.runacross several scripts. scripts/office/soffice.pyexecutesgccto compile its shim andsofficeto process documents.scripts/accept_changes.pyexecutessofficewith headless flags and custom environment variables.scripts/office/validators/redlining.pyexecutesgit diffwith 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:
.docxfiles are unpacked and their XML content is processed by multiple scripts in thescripts/office/directory. - Boundary markers: The skill includes extensive validation logic in
scripts/office/validators/and utilizesdefusedxmlin 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 standardxml.etree.ElementTreeorlxml(potentially vulnerable if not configured strictly) across various scripts.
Audit Metadata