Back to skill

Security audit

Image Edit Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to edit and inspect images locally as advertised, with ordinary cautions around saved files, image metadata, unpinned packages, and large-image resource use.

Install this in a dedicated virtual environment, pin or review dependency versions, and remove openpyxl if you do not need it. Treat EXIF and JSON metadata outputs as potentially private, choose output paths carefully, keep backups of originals, and avoid processing untrusted oversized images or using extreme resize and worker settings.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Unpinned and Unnecessary Third-Party Dependencies## Vulnerability Details **File Location**: `requirements.txt:1-2`; installation is instructed by `README.md:15-18` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium **Vulnerable Code**: `requirements.txt:1-2` ```text Pillow openpyxl ``` `README.md:15-18` ```markdown ## Installation ```bash pip install -r requirements.txt ``` ``` ### Technical Analysis Both dependencies are installed without exact versions, compatible-version constraints, or package hashes. Consequently, the versions installed depend on the package-index state at installation time rather than versions reviewed with this project. `openpyxl` is not imported by any of the executable scripts and is unrelated to the documented image-processing functionality. Installing an unused package unnecessarily expands the dependency graph and supply-chain attack surface. A malicious or compromised dependency release could potentially run code through package build hooks during installation. A vulnerable or behaviorally incompatible future release could also affect the application at runtime. Exploitation depends on compromise of a package release, package index, configured mirror, or dependency-resolution environment; the project does not itself contain evidence that the named packages are currently malicious. ### Attack Path 1. A user follows the documented installation procedure and runs `pip install -r requirements.txt`. 2. `pip` resolves whichever package versions are currently available because no reviewed versions or hashes are specified. 3. An attacker compromises a future release, package-index account, configured mirror, or another part of the dependency-resolution channel. 4. The unreviewed package artifact is downloaded and installed. 5. Malicious build logic may execute with the privileges of the user performing the installation. Malicious runtime logic in Pillow could subsequently execute when the image-processin ...[truncated 583 chars]
Remediation
## Remediation Suggestions 1. Remove `openpyxl` unless a documented and tested feature requires it. 2. Pin Pillow to a reviewed exact version or a narrowly controlled compatible range. 3. Generate a lock file containing cryptographic hashes and install with hash verification, such as `pip install --require-hashes -r requirements.lock`. 4. Obtain packages only from an explicitly configured trusted index over TLS. 5. Run dependency vulnerability scanning in CI and review dependency updates before merging them. 6. Install and run the Skill in a dedicated virtual environment under a non-privileged account. 7. Keep the requirements manifest synchronized with actual imports and documented capabilities.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/batch_processor.py:68
Finding
Unbounded Image Dimensions and Worker Count Permit Local Resource Exhaustion## Vulnerability Details **File Location**: `scripts/image_editor.py:14-31, 116-117`; `scripts/batch_processor.py:68-83, 122-124` **Vulnerability Type**: T09: Insecure Skill Coding Practices **Risk Level**: Low **Vulnerable Code**: `scripts/image_editor.py:14-31` ```python def resize_image(img, width=None, height=None, keep_aspect=True): """Resize image to specified dimensions""" if not width and not height: return img original_width, original_height = img.size if keep_aspect: if width and not height: height = int(original_height * width / original_width) elif height and not width: width = int(original_width * height / original_height) elif width and height: # Keep aspect ratio, fit within bounds ratio = min(width / original_width, height / original_height) width = int(original_width * ratio) height = int(original_height * ratio) else: width = width or original_width height = height or original_height return img.resize((width, height), Image.Resampling.LANCZOS) ``` `scripts/image_editor.py:116-117` ```python parser.add_argument('--width', type=int, help='New width') parser.add_argument('--height', type=int, help='New height') ``` `scripts/batch_processor.py:68-83` ```python parser.add_argument('--resize', nargs=2, type=int, metavar=('WIDTH', 'HEIGHT'), help='Resize all images to width x height') parser.add_argument('--thumbnail', nargs=2, type=int, metavar=('MAX_W', 'MAX_H'), help='Create thumbnails (maintains aspect ratio)') parser.add_argument('--grayscale', action='store_true', help='Convert to grayscale') parser.add_argument('--brightness', type=float, help='Adjust brightness (0.0-2.0)') parser.add_argument('--format', help='Convert to format (JPEG, PNG, etc.)') parser.add_argument('--quali ...[truncated 2617 chars]
Remediation
## Remediation Suggestions 1. Reject non-positive dimensions and enforce deployment-specific maximum width, height, and total pixel count. 2. Estimate output memory before resizing, accounting for image mode and temporary processing buffers. 3. Bound `--workers` to a conservative range derived from CPU count, for example between 1 and a configured maximum. 4. Enforce documented ranges for JPEG quality, opacity, scale, brightness, contrast, color, and sharpness. 5. Limit the number of files accepted in one batch and avoid creating all futures simultaneously for very large directories. 6. Validate source dimensions and file sizes before expensive processing and handle Pillow decompression-bomb warnings as hard failures where appropriate. 7. Run processing inside a constrained worker environment with memory, CPU, execution-time, process, and file-descriptor limits. 8. Return a clear validation error before opening or transforming an image when a requested operation exceeds configured limits.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (11)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The examples explicitly show extracting image metadata and saving it to JSON, but do not warn that EXIF and related metadata can contain sensitive information such as GPS coordinates, timestamps, device identifiers, and author details. In an image-processing skill, users are likely to treat metadata export as routine, which increases the chance of unintended disclosure when those JSON files are shared, published, or logged.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises executable scripts that write output files (for example, producing edited images, thumbnails, watermarked images, and JSON metadata), but it does not declare any tool scope such as permissions or allowed-tools. That mismatch weakens least-privilege controls because an agent or reviewer cannot clearly tell that filesystem write access is required, increasing the chance of unintended file creation or overwrite when the skill is used.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file explicitly presents this document as '简体中文' with an English link alternative, which indicates the skill content is fixed to a specific language in this file rather than offering language choice within the skill behavior. The policy requires not forcing a specific language or locale without user opt-in unless clearly justified as region-specific.

Missing User Warnings

Low
Confidence
91% confidence
Finding
The README advertises image analysis and EXIF extraction but does not warn users that metadata can contain sensitive information such as GPS coordinates, device identifiers, timestamps, or author details. In a skill explicitly designed to inspect and export image information, this omission increases the chance that users will unintentionally expose private data when sharing outputs or processed files.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
This file's content is entirely in Simplified Chinese, which may impose a language expectation on users reading this variant. Although there is an English link, the file itself does not state that language selection is optional or user-driven, creating a mild language/locale policy concern.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The description and feature list explicitly mention extracting detailed information, metadata, and EXIF data, but the markdown does not warn users about possible privacy implications. Because metadata handling can expose personal or system-sensitive information, the skill description should disclose that risk to users.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This markdown file gives command examples for image editing, watermarking, batch processing, and saving metadata output, all of which write new files to user-specified paths. There is no visible warning about overwrite risk, output-path caution, or the impact of bulk processing, which is the kind of user-data/system-integrity disclosure expected for markdown descriptions of file-affecting behavior.

Unpinned Dependencies

Low
Category
Supply Chain
Content
Pillow
openpyxl
Confidence
95% confidence
Finding
The dependency is unpinned, so installs may resolve to different Pillow versions over time, including versions with known security defects or breaking changes. In an image-processing skill, this matters because Pillow handles attacker-controlled image inputs, which increases exposure to parser and resource-consumption vulnerabilities.

Unverifiable Dependency: Pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding
Pillow has multiple historical advisories, including issues affecting image parsing and resource handling, and the manifest does not specify a version, so there is no way to verify whether a safe release will be installed. Because this skill is explicitly for image manipulation, it is more exposed than a typical package list: image decoders commonly process untrusted content and have a larger attack surface.

Unpinned Dependencies

Low
Category
Supply Chain
Content
Pillow
openpyxl
Confidence
90% confidence
Finding
The openpyxl dependency is unpinned, making builds non-reproducible and leaving the installed version uncertain. If the skill processes spreadsheet files from untrusted sources, older vulnerable releases could expose XML parsing issues such as XXE-related behavior.

Unverifiable Dependency: openpyxl has 2 known advisory(ies) (CVE-2017-5992 (Improper Restriction of XML External Entity Reference in Openpyxl); CVE-2017-5992 (Openpyxl 2.4.1 resolves external entities by default, which allows remote attack)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
84% confidence
Finding
openpyxl has known advisories and the unpinned manifest makes it impossible to determine whether an affected release may be installed. The risk is somewhat contextual here because the skill is primarily for Pillow/image processing, but if spreadsheet support is used on untrusted files, vulnerable XML handling could still be relevant.

Static analysis

No suspicious patterns detected.