Back to skill

Security audit

Word Handler

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to locally generate Word quotation documents, with documentation and dependency cautions but no hidden network, persistence, or credential behavior.

Install in a virtual environment and consider pinning `python-docx` before use. Treat this primarily as a local quotation DOCX generator, not a complete Word read/edit suite, and verify output paths so existing documents are not overwritten.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:53
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 53-57 **Vulnerability Type**: Uncontrolled third-party dependency version **Risk Level**: Medium ### Vulnerable Code ```markdown ## Dependencies ```bash pip3 install python-docx ``` ``` ### Technical Analysis The documented installation command retrieves `python-docx` without specifying an audited version or verifying an integrity hash. Consequently, the version installed depends on the package index state at installation time and may differ from the version originally reviewed with this Skill. This creates a software supply-chain risk. If the upstream package, maintainer account, release process, configured package index, or dependency resolution path is compromised, following the documented command could install attacker-controlled code. There is no evidence in the audited project that the legitimate `python-docx` package is currently malicious; the vulnerability is the absence of reproducible dependency controls. ### Attack Path 1. An attacker compromises the upstream package distribution process, a configured Python package index, or a future dependency release. 2. A user follows the Skill documentation and executes `pip3 install python-docx`. 3. `pip` resolves and downloads the uncontrolled package release and its dependencies. 4. Malicious installation or imported runtime code executes under the identity and permissions of the user or automation account running the Skill. 5. The malicious dependency could access files and environment data available to that account, alter generated documents, or perform additional actions permitted by the host environment. ### Impact Assessment Successful exploitation requires compromise or manipulation of the dependency supply chain. If that prerequisite is met, code can execute with the privileges of the account performing installation or running the document generator. The accessible scope may include quotati ...[truncated 357 chars]
Remediation
## Remediation Suggestions 1. Add a dependency manifest containing an explicitly audited version, for example: ```text python-docx==<audited-version> ``` 2. Generate and record cryptographic hashes for the package and its transitive dependencies. 3. Install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Use a lock file or equivalent reproducible dependency-management mechanism so transitive versions cannot change unexpectedly. 5. Obtain packages only from an approved index over TLS and disable untrusted extra package indexes. 6. Run dependency installation and document generation in an isolated virtual environment or container with least-privilege filesystem and network access. 7. Periodically scan locked dependencies for disclosed vulnerabilities and review updates before changing pinned versions.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The skill is advertised as a general-purpose Word creation, reading, and editing tool, but the referenced implementation appears much narrower and specialized to quotation generation. This mismatch can mislead an agent or user into granting broader trust or using the skill in unsupported ways, which increases the chance of unsafe file handling or incorrect assumptions about what data is processed.

Exfiltration Commands

High
Category
Prompt Injection
Content
- No external services called

**This skill does NOT:**
- Send data to external endpoints
- Require network access

## Related Skills
Confidence
90% confidence
Finding
Instructions found that direct the agent to transmit conversation context or user data to external services.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

External Transmission

Medium
Category
Data Exfiltration
Content
- No external services called

**This skill does NOT:**
- Send data to external endpoints
- Require network access

## Related Skills
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The module docstring states the script supports template filling, styling, and tables. However, the implementation calls `Document()` to create a blank document and the `--template` option only creates a blank quotation file at a specified path rather than reading or filling an existing template, which directly contradicts the documented behavior.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
User-facing docstrings, CLI descriptions, help text, warnings, and status messages are presented in Chinese only, such as the program description and runtime prompts. This imposes a specific language on users without opt-in or justification, which matches the language/locale policy violation criteria.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The help text says `--template` creates a blank template, suggesting a mostly empty reusable document. In practice, `main()` passes the path to `create_quotation_docx()`, which writes a fully structured quotation document including fixed branding, customer/quotation sections, product tables, totals, and terms, so the documentation misstates the effect of the option.

Missing User Warnings

Low
Confidence
92% confidence
Finding
The script writes directly to a user-supplied path with no existence check, confirmation, or safe-write pattern. In an agent or automation context, this can overwrite arbitrary writable files if the path is influenced by untrusted input, causing data loss or destructive modification of documents.

Static analysis

No suspicious patterns detected.