Back to skill

Security audit

TIFF Merge & Split

Security checks for vulnerabilities and agentic risk

Overview

This is a local TIFF image-processing skill with some overstated or incomplete functionality, but I found no evidence of exfiltration, persistence, privilege escalation, or hidden behavior.

Install only if you are comfortable with a local Node CLI that reads and writes the image paths you provide. Expect rough functionality: TIFF splitting and JPG/PNG support appear incomplete despite the description. For safer installation, pin the utif dependency to a reviewed version and run the tool in a directory that contains only the images you intend to process.

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

Unpinned npm Dependency Creates a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 11–14
Vulnerability Type: Unpinned third-party npm dependency
Risk Level: Medium

Vulnerable Code

yaml
install:
  - kind: npm
    package: utif

The same unversioned dependency declaration also appears in skill.md, lines 12–15:

yaml
install:
  - kind: npm
    package: utif
    bins: []

In addition, README.md, lines 19–20, recommends installing another package globally without a fixed version:

bash
npm install -g clawhub
clawhub install tiff-merge

Technical Analysis

The installation metadata identifies npm packages only by name and provides no exact version, lockfile, or integrity hash. Consequently, installation may resolve a mutable future release rather than the version that was reviewed.

This does not establish that either named package is currently malicious. It creates a supply-chain exposure: if a package or maintainer account is compromised, ownership changes, or a future release is malicious, users can receive code different from the audited dependency. npm package lifecycle code may execute during installation, while utif is also loaded at runtime through require('utif').

Attack Path

  1. An attacker compromises a referenced npm package, its publisher account, or its release process.
  2. The attacker publishes a malicious release under the legitimate package name.
  3. A user installs the skill according to its metadata or documentation.
  4. Because no exact reviewed version is required, npm resolves the attacker-controlled release.
  5. Malicious package lifecycle code may execute during installation, or malicious runtime code may execute when index.js loads and uses the dependency.

This exploitation path depends on upstream package or publisher compromise; the audited project itself contains no remote payload retrieval or malicious code.

Impact Assessment

Malicious de ...[truncated 642 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin every dependency to an exact, reviewed version rather than a package name or floating range.
  2. Add a package manifest and committed lockfile containing registry integrity hashes.
  3. Use deterministic installation, such as npm ci, where supported.
  4. Pin the ClawHub CLI version in installation documentation and avoid global installation unless it is operationally necessary.
  5. Review package provenance, publisher ownership, lifecycle scripts, and release changes before updating pinned versions.
  6. Run installation and image processing under a least-privileged account, without unnecessary access to secrets or sensitive directories.
  7. Consider disabling npm lifecycle scripts during installation when dependencies do not require them.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

描述与代码存在实质性不一致。首先,splitTIFF 函数会读取 TIFF、解码各页、生成输出文件名并记录到数组,但并没有调用任何库将 rgba 数据编码并写入 PNG/JPG 文件;注释还明确承认“简化实现:保存为原始数据 / 实际需要使用 sharp 或 canvas 库转换为图片格式”,因此“拆分 TIFF 为单张图片”这一核心能力未真正实现。其次,mergeToTIFF 宣称可将多张图片合并为 TIFF,但 loadImage 只是原样返回 buffer,decodeImage 使用 UTIF.decode 解析输入,这通常只适用于 TIFF,而非示例中宣称的 JPG 等常见图片格式,因此“图片合并为 TIFF”的通用能力被夸大。另一方面,代码是本地 CLI,使用 fs/path/UTIF 处理本地文件,没有网络、外传或其他未声明的敏感能力,因此不属于隐私/权限方面的越界,而是功能描述过度。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest description says the skill can '拆分 TIFF 为单张图片', which implies producing actual standalone image files. In code, splitTIFF decodes TIFF pages and builds output paths, but never encodes or writes PNG/JPG data to disk; comments at L80-L81 explicitly admit the implementation is simplified and incomplete.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description states both '合并图片为 TIFF' and '拆分 TIFF 为单张图片', implying two capabilities: merge and split. In this README, all documented features, usage examples, and CLI invocations describe only combining multiple images into a multi-page TIFF, with no split/extract workflow mentioned.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language trigger examples are broad, everyday phrases like '帮我把这几张图片合并成 TIFF', which may cause the skill to activate unintentionally in general conversation or in contexts where a user did not mean to invoke the tool. In an agent ecosystem, overly generic invocation phrases can increase the risk of accidental file processing or unintended workflow execution, especially when local files are involved.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents its user-facing description and command-line interaction text in Chinese, and later continues this pattern throughout the CLI output. This forces a specific language on users without opt-in, which matches the natural-language locale policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The comments describe a 'simplified implementation' that '保存为原始数据', suggesting some form of file output occurs. However, there is no write call after outputName is constructed, so the function neither saves raw data nor converted image data, contradicting the documented behavior around this block.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

All user-facing instructions and examples are presented in Chinese, and the document does not indicate that the skill is region-specific or that users may choose another language. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The markdown defines invocation through general natural-language examples such as “帮我把这几张图片合并成 TIFF” and “帮我生成一个 TIFF 文件,包含这些图片,” but it does not specify clear boundaries for when the skill should or should not activate. Without negative examples or narrower trigger guidance, these phrases could overlap with ordinary assistant requests about image handling.

Content

No source excerpt is available for this finding.