Back to skill

Security audit

Office Toolkit

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Office document helper, but its setup instructions ask users to modify the host system with privileged, unpinned installs.

Review the setup commands before installing. Prefer a virtual environment, avoid --break-system-packages, only run sudo apt install if you trust your OS package sources, and keep backups when editing existing documents.

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:13
Finding

Unpinned System-Wide Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 13–14
Vulnerability Type: Unpinned dependencies and unsafe system-wide package installation
Risk Level: Medium

Complete Code Snippet:

bash
pip install --break-system-packages python-docx openpyxl python-pptx pypdf
sudo apt install libreoffice-writer libreoffice-calc libreoffice-impress pandoc

Technical Analysis

The installation instructions do not pin Python or operating-system package versions and do not verify package hashes. Consequently, the installed code depends on mutable upstream package repositories rather than a reviewed, reproducible dependency set.

The --break-system-packages option explicitly bypasses Python's externally managed environment protection and permits modification of the host's system Python environment. This can overwrite or conflict with packages used by other applications. The sudo apt install command additionally performs privileged host-level changes, although no malicious package source or deliberate privilege-escalation mechanism was found in the audited files.

Exploitation depends on a dependency source being compromised, a malicious release being published under a resolved package name, or an unexpected upstream version introducing harmful installation or runtime behavior.

Attack Path

  1. An Agent or user follows the environment setup instructions.
  2. pip resolves the latest available releases because no versions or hashes are specified.
  3. A compromised or unexpectedly changed package is downloaded from the configured package index.
  4. Package installation logic executes and modifies the system Python environment because --break-system-packages is enabled.
  5. Malicious or vulnerable dependency code may subsequently execute when the document-processing libraries are imported or used.
  6. Separately, the sudo apt install instruction installs host-level packages with administrative privile ...[truncated 716 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create and use a dedicated virtual environment rather than modifying the system Python installation.
  2. Remove --break-system-packages from the installation command.
  3. Pin every Python dependency to a reviewed version in a requirements or lock file.
  4. Use hash verification, such as pip install --require-hashes -r requirements.txt, with reviewed hashes.
  5. Perform dependency vulnerability and provenance checks before publication and on every update.
  6. Require explicit user approval before installing operating-system packages with sudo.
  7. Pin OS package versions where operationally practical and use only trusted, authenticated repositories.
  8. Update _meta.json to declare the required binaries accurately, because it currently reports an empty anyBinaries list despite the documented reliance on Pandoc and LibreOffice.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The installation instructions include privileged package installation and --break-system-packages without warning about system integrity or least-privilege concerns. This can encourage unsafe environment modification and increase the blast radius if users follow the instructions blindly.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

The documented use of sudo apt install normalizes root-level execution in a skill, which is risky in agent ecosystems because users may execute setup steps without understanding the trust implications. Elevated installation increases the consequences of mistakes, compromised package sources, or copy-pasted modifications.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

bash
pip install --break-system-packages python-docx openpyxl python-pptx pypdf
sudo apt install libreoffice-writer libreoffice-calc libreoffice-impress pandoc

快速参考

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill invokes an external binary (pandoc) through subprocess.run, which increases capability beyond pure in-process library use and can become dangerous if later adapted to accept untrusted arguments or file paths without validation. External tool execution also broadens the attack surface and may process malformed documents with vulnerabilities in the converter.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill provides direct file creation and modification examples without emphasizing overwrite risk, backup practices, or safe output-path handling. In an agent context, this can lead to unintended destruction or replacement of user files when operating on sensitive documents.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

While Office document editing is in scope, the recommendation at L079 relies on launching LibreOffice rather than the documented Python libraries. Invoking a desktop application is a materially broader operational capability and is not clearly disclosed in the manifest description beyond a brief dependency mention.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest at L003 says the skill is based on python-docx, openpyxl, python-pptx, and pypdf. The quick reference at L024 states Excel reading may use pandas, which introduces behavior and dependency outside the described implementation scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description at L003 limits the skill to reading, creating, and editing Office/PDF documents using python-docx, openpyxl, python-pptx, and pypdf. The quick reference at L030 adds a separate image-conversion capability using pdftoppm, which goes beyond the stated document-handling scope and is not disclosed in the manifest description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The credential setup description is written as Chinese-only text ("无凭证需求。") in a manifest that otherwise provides no indication that the skill is region- or language-specific. This can violate language/locale policy because it forces a specific language without documented user opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.