docx-processing-anthropic
Warn
Audited by Gen Agent Trust Hub on May 16, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [REMOTE_CODE_EXECUTION]: The script
scripts/office/soffice.pyimplements a dynamic execution and process injection pattern. - It contains a raw C source string that is written to a temporary file at runtime.
- The script executes
gccto compile this source into a shared library (.so). - It then utilizes the
LD_PRELOADenvironment variable to inject the compiled library into thesoffice(LibreOffice) process. This is used to intercept and shim socket-related system calls. - [COMMAND_EXECUTION]: The skill frequently uses the
subprocessmodule to interface with system utilities and the office suite. scripts/accept_changes.pyrunssofficewith headless flags and macro execution commands.scripts/office/soffice.pyrunsgccfor dynamic compilation andsofficefor document conversion tasks.scripts/office/validators/redlining.pyexecutesgit diffto perform word-level comparisons between document versions.- [PROMPT_INJECTION]: The skill architecture creates a surface for indirect prompt injection when processing external documents.
- Ingestion points: Untrusted data from Word documents is ingested through
scripts/office/unpack.pyand viapandoctext extraction. - Boundary markers: The instructions lack explicit delimiters or safety warnings for the agent to disregard instructions embedded within the document XML or extracted text.
- Capability inventory: The skill scripts possess significant system capabilities, including arbitrary command execution via subprocesses and extensive file system access.
- Sanitization: While the skill appropriately uses
defusedxmlto mitigate XML external entity (XXE) attacks, it does not sanitize the natural language content processed at runtime, allowing potential malicious instructions in documents to influence agent behavior.
Audit Metadata