Back to skill

Security audit

Xlsx Anthropic

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a spreadsheet helper, but it ships under-disclosed Office document tooling and uses risky LibreOffice runtime setup that users should review before installing.

Install only if you are comfortable with a spreadsheet skill that also contains hidden Word and PowerPoint document-processing code and that modifies the LibreOffice profile for recalculation. Use it in a contained workspace, avoid feeding it untrusted Office files, and review or remove the DOCX/PPTX helpers and LD_PRELOAD shim before using it on sensitive documents.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/office/soffice.py:24
Finding

Predictable LD_PRELOAD Library Allows Local Native Code Execution

Content
View full analysis
dict: env = os.environ.copy() env["SAL_USE_VCLPLUGIN"] = "svp" if _needs_shim(): shim = _ensure_shim() env["LD_PRELOAD"] = str(shim) return env def run_soffice(args: list[str], **kwargs) -> subprocess.CompletedProcess: env = get_soffice_env() return subprocess.run(["soffice"] + args, env=env, **kwargs) _SHIM_SO = Path(tempfile.gettempdir()) / "lo_socket_shim.so" def _needs_shim() -> bool: try: s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) s.close() return False except OSError: return True def _ensure_shim() -> Path: if _SHIM_SO.exists(): return _SHIM_SO src = Path(tempfile.gettempdir()) / "lo_socket_shim.c" src.write_text(_SHIM_SOURCE) subprocess.run( ["gcc", "-shared", "-fPIC", "-o", str(_SHIM_SO), str(src), "-ldl"], check=True, capture_output=True, ) src.unlink() return _SHIM_SO ``` ### Technical Analysis The native shim is stored at the fixed, globally predictable path `/tmp/lo_socket_shim.so`. If that path already exists, `_ensure_shim()` accepts it without verifying: - File ownership - File permissions - Whether it is a regular file or symbolic link - Whether it was produced from the embedded source - Its cryptographic integrity When Unix-domain socket creation fails, `get_soffice_env()` places this file in `LD_PRELOAD`. The dynamic loader then loads the shared object into every LibreOffice process launched with that environment. Native library constructors and interposed functions execute with the privileges of the user running the Skill. This creates a local tool-hijacking condition: an attacker who can write to the shared temporary di ...[truncated 1789 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/office/unpack.py:53
Finding

Unbounded Extraction of Untrusted Office Archives Enables Resource Exhaustion

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (48)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

DOCX redline validation, ZIP-package unpacking, XML parsing of Word documents, and use of git diff for document text differences are all outside the declared spreadsheet mission. This hidden behavior increases the risk of unexpected content exposure and mutation in sensitive legal or review documents under the guise of a spreadsheet task.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This helper clearly operates on DOCX internals (word/document.xml, <w:r>, <w:t>) even though the skill manifest is explicitly scoped to spreadsheets (.xlsx, .xlsm, .csv, .tsv). That scope mismatch is dangerous because it grants undocumented document-editing capability, increasing the chance the agent will process or modify files outside user expectations and outside the reviewed trust boundary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file provides substantive document-editing behavior for Word documents, including removing revision metadata and merging text runs, which is unrelated to a spreadsheet-focused skill. In skill-based agents, hidden or unjustified capabilities are a security problem because they expand what the agent can alter without clear user consent, enabling unexpected modification of non-spreadsheet content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The function modifies LibreOffice execution by conditionally setting LD_PRELOAD to a custom shared library, allowing interception of libc socket and process-exit behavior. That exceeds the expected trust boundary for file-format handling and can conceal significant runtime behavior from operators and downstream callers.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/office/soffice.py (reported line 25)May include surrounding context.

python
def get_soffice_env() -> dict:
    env = os.environ.copy()
    env["SAL_USE_VCLPLUGIN"] = "svp"

    if _needs_shim():

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Compiling and later injecting a native LD_PRELOAD shim is unrelated to ordinary spreadsheet processing and grants low-level influence over process behavior. In the context of a spreadsheet skill, this is especially dangerous because users would reasonably expect document conversion, not dynamic compilation and process interposition.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script claims to accept .xlsx files, including unpacking them, but the dispatch logic has no XLSX validator and exits with an unsupported-type error. In a spreadsheet-focused skill, this can cause failed validation gates or skipped integrity checks for user-supplied spreadsheets, increasing the chance that malformed or unsafe spreadsheet content is treated as processed or validated when it is not.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements DOCX Word-processing validation and repair inside a skill explicitly scoped to spreadsheet inputs and outputs. That scope mismatch expands the skill's effective capability beyond what users and reviewers would expect, increasing the risk of unintended document handling, hidden functionality, and misuse of the agent in contexts outside its declared purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The repair path actively modifies Word XML by rewriting durable IDs, which is a write-capability unrelated to spreadsheet deliverables. In the context of an xlsx-only skill, undocumented mutation of DOCX content is especially dangerous because it can alter non-target files, conceal broader office-document manipulation features, and violate least-privilege expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file implements Word document tracked-change validation, which does not match the declared spreadsheet-only xlsx skill. This kind of capability mismatch is dangerous because it expands the skill's effective scope, can route non-spreadsheet content through an unexpected processing path, and is a strong signal of packaging drift or hidden functionality that reviewers and users would not anticipate.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill advertises and documents the use of filesystem access, shell execution, environment interaction, and LibreOffice-driven processing, yet it declares no explicit tool scope or permission boundaries. In a skill that can read, write, and execute on user-supplied office files, missing scope constraints increase the blast radius if the skill is triggered on adversarial input or repurposed for unintended operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are overly broad and include casual references like 'the xlsx in my downloads,' which increases the chance of unintended invocation on ambiguous user requests. In a skill with file and shell capabilities, overscoped routing is dangerous because it can expose files or activate document-processing logic without sufficiently clear user intent.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

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

CRITICAL: Use Formulas, Not Hardcoded Values

Always use Excel formulas instead of calculating values in Python and hardcoding them. This ensures the spreadsheet remains dynamic and updateable.

❌ WRONG - Hardcoding Calculated Values

python

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code writes directly back to document.xml in place, so invoking it irreversibly changes the source document structure unless higher-level code created a backup. Even if intended as normalization, silent in-place mutation can cause data loss, destroy revision/proofing metadata, or alter legal/audit-sensitive documents without explicit warning or confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code performs an in-place write to word/document.xml, modifying user document data. Although the module docstring describes the behavior generally, there is no runtime confirmation, logging, or explicit user-facing warning at the point of mutation, so the destructive file-write operation lacks disclosure in the code itself.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.