Back to skill

Security audit

officecli-xlsx

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Excel-workbook helper, but its setup instructions tell users to execute an unverified remote installer directly in a shell.

Review the installer path before installing. Prefer a pinned OfficeCLI release from the publisher with published checksums or signatures, and only run installer scripts after explicit inspection and consent. Once installed, the skill's workbook-editing instructions are otherwise aligned with normal XLSX work, but it can modify local spreadsheet files when used.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:12
Finding
Unverified Remote Installer Download and Immediate Shell Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 12–13 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```markdown - **macOS / Linux**: `curl -fsSL https://d.officecli.ai/install.sh | bash` - **Windows (PowerShell)**: `irm https://d.officecli.ai/install.ps1 | iex` ``` ### Technical Analysis Both installation commands retrieve mutable content from `d.officecli.ai` and execute the response immediately in a local command interpreter. The macOS/Linux command pipes the HTTP response directly into Bash, while the Windows command passes it to PowerShell's `Invoke-Expression`. Neither flow pins a release version, verifies a cryptographic checksum or signature, nor gives the user an opportunity to inspect the downloaded script before execution. HTTPS protects the connection in transit but does not guarantee that the server-hosted payload remains identical to the payload originally reviewed. Compromise of the hosting service, DNS, delivery infrastructure, or publisher account could therefore turn these instructions into an arbitrary-code execution channel. Installing an XLSX manipulation tool is consistent with the Skill's declared purpose. However, immediate execution of an unverified remote script exceeds the minimum mechanism required to install that tool. The document already references GitHub release artifacts as an alternative, which could support a version-pinned and integrity-verified installation process. No evidence was found in the reviewed file of credential harvesting, persistence installation, privilege escalation, obfuscation, data exfiltration, or instruction hijacking. The risk arises because the external installer may change after review and receives all privileges held by the invoking user. ### Attack Path 1. The Skill is loaded for an XLSX-related task. 2. The agent or user determines that `officecli` is not installed. 3. The setup instructions cause the remote install ...[truncated 1280 chars]
Remediation
## Remediation Suggestions 1. Remove both direct pipe-to-interpreter installation commands. 2. Pin installation instructions to a specific, immutable OfficeCLI release and artifact. 3. Download the artifact to disk without executing it automatically. 4. Publish trusted SHA-256 checksums or cryptographic signatures through an independently protected channel and require verification before installation. 5. Prefer a reputable package manager with version pinning and package-signature validation where available. 6. If a script installer remains necessary, use a staged process: download it, verify its signature or checksum, present its source and intended changes for inspection, obtain explicit user approval, and only then execute it. 7. Do not request administrator privileges unless a documented installation step strictly requires them. Prefer a user-scoped installation directory. 8. Require explicit user consent before installing external software; the Skill should not autonomously install dependencies. 9. Document the expected artifact name, version, checksum, publisher identity, installation paths, and filesystem or environment changes so the installation can be audited. 10. Consider distributing a reviewed installer within a trusted, versioned package rather than retrieving mutable executable content at runtime.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

External Script Fetching

High
Category
Supply Chain
Content
If `officecli` is missing:

- **macOS / Linux**: `curl -fsSL https://d.officecli.ai/install.sh | bash`
- **Windows (PowerShell)**: `irm https://d.officecli.ai/install.ps1 | iex`

Verify with `officecli --version` (open a new terminal if PATH hasn't picked up). If install fails, download a binary from https://github.com/iOfficeAI/OfficeCLI/releases.
Confidence
99% confidence
Finding
The skill instructs users to pipe a remotely fetched script directly into a shell (`curl | bash` and `irm | iex`), which enables arbitrary code execution from a network source without prior verification. If the download host, transport path, or upstream distribution is compromised, running the skill can immediately execute attacker-controlled code on the host.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- **Cross-sheet formula batches run fine through a resident** — a prior "deadlocks even at 3-5 ops" caution no longer reproduces. Pure value-set batches stay reliable at 50-80+ ops too. If you ever hit a hang, fall back to a non-resident one-big-batch or individual `set`. **Multiple resident processes on the same file/machine can still contend** — expect non-deterministic hangs if another agent/session holds a resident on the same file.
- **Conditional formatting naming asymmetry** — the element name for `--type` is `conditionalformatting`; the path suffix is `/cf[N]`. Use `officecli help xlsx conditionalformatting` for schema, `/cf[N]` for paths.
- **Sheet `position` prop on add** — help says Add processes `position`, but the prop is often ignored. Reorder with `officecli move --index` / `--after` / `--before` after creating the sheet.
- **`remove /sheet[N]` cascade guard** — rejects sheet remove/rename when the sheet is referenced by validation / conditional format / sparkline / hyperlink / named range on another sheet. Remove those dependent elements first, then remove the sheet.
- **Batch JSON rejects cell `color` alias** — inside batch `props`, `"color": "FF0000"` errors `ambiguous in cell context — use 'font.color' (text) or 'fill' (bg)`. The CLI at shell level accepts `--prop color=...` / `--prop size=14` as aliases on non-cell elements, but inside batch JSON on a cell always write the full dotted name: `"font.color"`, `"font.size"`, `"font.name"`.

### Renderer caveats (cross-viewer color fidelity)
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Vague Triggers

Medium
Confidence
97% confidence
Finding
The description says to use the skill any time a .xlsx file is involved and to trigger whenever the user mentions broad terms like 'spreadsheet', 'workbook', 'tracker', or 'dashboard'. These terms are common in everyday business requests and the file provides no exclusion conditions or negative examples to narrow activation scope.

Static analysis

No suspicious patterns detected.