Back to skill

Security audit

Axiom Image Metadata Stripper

Security checks for vulnerabilities and agentic risk

Overview

This is a local image metadata removal tool, but it overstates its privacy guarantees and supported formats.

Install only if you treat it as a limited, best-effort JPEG/PNG helper. Do not rely on it alone before publishing sensitive photos; verify outputs with a mature metadata tool, keep original backups, avoid GIF inputs, and be cautious with untrusted or malformed JPEG files.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
axiom_image_metadata_stripper.py:92
Finding

Malformed JPEG Segment Length Can Cause Infinite-Loop Denial of Service

Content
View full analysis
H", data[i:i+2])[0] segment = data[i-2:i+length] if marker in METADATA_MARKERS: # Skip this metadata segment pass else: # Keep this segment output.extend(segment) i += length - 2 # -2 because we already consumed 2 bytes (length) ``` The analysis path contains the same unsafe cursor calculation: ```python if i + 1 >= len(data): break length = struct.unpack(">H", data[i:i+2])[0] if marker in METADATA_MARKERS: result["metadata_chunks"].append({ "marker": marker.hex(), "name": METADATA_MARKERS[marker], "size": length, }) i += length - 2 if marker == JPEG_SOS: break ``` ### Technical Analysis The parser trusts the two-byte JPEG segment length without checking that it is at least the format-mandated minimum or that the declared segment fits within the input buffer. When the declared length is zero, the statement `i += length - 2` moves the cursor backward by two bytes. This returns the cursor to the same marker and causes the loop to parse that marker repeatedly without making forward progress. The same condition affects both `strip_jpeg()` and `analyze()`. The parser also does not reject truncated segments where the declared length extends beyond the available input. Python slicing prevents an immediate out-of-bounds exception, but this permissive behavior can produce corrupted output and makes parser state inconsistent. ### Attack Path 1. An attacker creates a file beginning with valid JPEG magic bytes. 2. The file contains a non-standalone JPEG marker whose segment-length field is `0x0000`. 3. The file is submitted to a serv ...[truncated 819 chars]
Remediation
View remediation
len(data): raise ValueError("Truncated JPEG segment length") length = struct.unpack(">H", data[i:i + 2])[0] if length < 2: raise ValueError(f"Invalid JPEG segment length: {length}") segment_end = i + length if segment_end > len(data): raise ValueError("JPEG segment extends beyond input") previous_i = i # Process the validated segment and move to its exact end. i = segment_end if i <= previous_i: raise ValueError("JPEG parser made no forward progress") ``` ]]>

T09 · Insecure Skill Coding Practices

Error
Location
axiom_image_metadata_stripper.py:103
Finding

JPEG Metadata After the First Scan Is Copied Without Inspection

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The code substantially matches the core purpose of stripping image metadata and uses only the standard library. It does remove common metadata from JPEG and PNG images and exposes a CLI to do so. However, the declared description explicitly includes GIF support, while the implementation only strips JPEG and PNG; GIF is merely detected and then rejected as unsupported. That is a material description/behavior mismatch because supported file formats are central to the skill’s purpose. Additionally, the code offers a separate analysis mode that inspects metadata chunks without stripping them; this is an extra undeclared capability, though secondary compared with the format-support mismatch.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring presents key user-facing limitations and behavior entirely in French, and the CLI also emits French error text. If organizational policy requires not forcing a specific language without user choice, this natural-language content is a policy concern because no alternative language or opt-in is offered.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says the skill removes metadata from JPEG/PNG/GIF images, and format detection recognizes GIF files. However, the actual stripping path only handles JPEG and PNG, and unsupported formats raise an error, so GIF behavior does not match the advertised capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language content forces a specific language for the skill description, which can violate language/locale policy when no user opt-in or justification is provided. There is no indication that the skill is intentionally region-specific or that users can select another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description switches into French for its user-facing instructions and explanations, such as the problem statement, usage context, tests, limitations, and spec. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring explicitly states 'JPEG/PNG seulement', while the manifest description says the skill supports JPEG/PNG/GIF images. This is an active contradiction between the skill's stated intent surfaces and indicates unclear or inconsistent declared behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The exception handler prints the user-visible error message prefix "Erreur" in French only. This can conflict with language/locale policy because the tool does not allow the user to select a preferred language or indicate that French-only output is intentional and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This is a markdown file, so SQP-2 applies to the user-facing description. The file states that it removes image metadata and notes format limitations, but it does not explicitly warn users that the operation permanently removes potentially important embedded data like location or camera information from the output file.

Content

No source excerpt is available for this finding.