Back to skill

Security audit

Photo Captions

Security checks for vulnerabilities and agentic risk

Overview

The skill mainly generates photo captions, but it silently requires running a separate unbundled photo-analysis skill without asking the user.

Install only if you are comfortable with it invoking an additional `photo-edit-analysis` skill whenever it runs. Prefer a version that makes edit analysis optional, declares any dependency clearly, and removes the inconsistent execute-capability wording.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:111
Finding

Mandatory Invocation of an Unbundled and Unaudited Skill

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 111
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Vulnerable Code:

markdown
Always run the `photo-edit-analysis` skill alongside this one. After generating captions, deliver the edit analysis as a separate section titled **📊 Edit Analysis**. Don't skip it, don't wait to be asked.

Technical Analysis

The skill's declared function is generating platform-specific social-media captions for photographs. However, the quoted instruction unconditionally directs the agent to invoke a separate photo-edit-analysis skill.

The phrases “Always run,” “Don't skip it,” and “don't wait to be asked” remove user control over whether this additional skill is loaded. This changes the scope of the current session from caption generation to an additional analysis task without explicit user consent.

The referenced skill is not included in the audited project, which contains only SKILL.md. Its instructions, implementation, permissions, and integrity therefore cannot be verified. Although no executable payload is present in this project, mandatory delegation creates a trust boundary through which separate, unaudited instructions could influence the agent.

Attack Path

  1. A user invokes this skill to generate photo captions.
  2. The agent loads and follows SKILL.md.
  3. Line 111 directs the agent to locate and invoke photo-edit-analysis, even though the user did not request it.
  4. The agent loads instructions from that external skill source.
  5. Any behavior defined by the referenced skill executes within the agent's available permissions.
  6. If the referenced skill is malicious, compromised, or replaced, it can redirect agent behavior, request tool operations, or produce additional unauthorized output.

This repository alone does not demonstrate compromise of the referenced skill. The confirmed issue is the unconditional transfer of control to an unbundled and unaud ...[truncated 771 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the unconditional cross-skill invocation and the language that bypasses user consent.
  2. Make edit analysis explicitly opt-in. Ask the user whether it is wanted before loading another skill.
  3. If edit analysis is essential, bundle its reviewed instructions within the same package rather than resolving an unspecified external skill at runtime.
  4. Pin the dependency to a verified identity and version, validate its integrity, and document its required tools and permissions.
  5. Apply least privilege to delegated operations. Do not grant the secondary skill tools that are unnecessary for image analysis.
  6. Handle an unavailable dependency safely by continuing with caption generation rather than searching for or loading an arbitrary substitute.
  7. A safer instruction would be:
markdown
After generating captions, offer optional edit analysis. Invoke a verified and pinned photo-edit-analysis dependency only after the user explicitly agrees.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description says "Use when" without a clear condition and lists generic trigger keywords like "photo", "generate", "social", and "media". These common terms overlap with everyday requests and do not define a narrow activation scope, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill's primary purpose is caption generation, but it unconditionally instructs the agent to invoke a separate photo-edit-analysis skill and append its output. This creates hidden cross-skill behavior that can disclose extra analysis, expand scope beyond user intent, and introduce risks from another skill that is not declared or described in the manifest.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest declares only the read tool, while the documentation says the skill is MD+execute and may require exec capability. This mismatch can cause agents or operators to grant broader privileges than expected or make unsafe assumptions about whether command execution is intended.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The core capability section again uses an incomplete condition ("Use when a user shares a photo and") and repeats broad trigger words instead of a precise trigger rule. This leaves activation boundaries unclear and provides no negative examples or scope limitations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file says "该技能目前仅支持英文" (the skill currently only supports English), which imposes a language restriction as a blanket policy. There is no user choice, opt-in, or documented region-specific justification for forcing English-only output.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.