Back to skill

Security audit

pixcakeai

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward photo-enhancement skill with some quality and dependency risks, but no evidence of hidden data access, persistence, exfiltration, or destructive behavior.

Before installing, be aware that this skill should only be used with trusted or size-limited images unless the publisher adds strict file size, image dimension, pixel-count, format validation, error handling, and a pinned lockfile for sharp.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
openclaw-index.js:12
Finding

Unbounded Image Decoding and Processing Enables Resource Exhaustion

Content
View full analysis

Vulnerability Details

File Location: openclaw-index.js, lines 12–17
Vulnerability Type: Unrestricted resource consumption through unvalidated image input
Risk Level: Medium

Vulnerable Code

js
// Get buffer from input
let buf = typeof img === "string" ? Buffer.from(img.split(",").pop(), "base64") : img.data ? Buffer.from(img.data, "base64") : img;

// Step 1: Resize to 9:16 aspect ratio
const meta = await sharp(buf).metadata();
const targetWidth = meta.width;
const targetHeight = Math.floor(meta.width * (16 / 9));

Technical Analysis

The handler converts attacker-controlled Base64 content into a memory buffer and passes it to Sharp without validating:

  • Encoded or decoded input size
  • Image format
  • Image dimensions
  • Total pixel count
  • Image authenticity
  • Processing time or memory consumption

A small compressed image can expand into a very large raster representation. In addition, the target output height is calculated directly from attacker-controlled image metadata. Subsequent crop, extension, enhancement, and JPEG-encoding operations create additional buffers, amplifying memory and CPU consumption.

The implementation also lacks local exception handling for malformed or unsupported image data. Consequently, decoding and processing failures propagate from the handler unless the hosting platform provides an external error boundary.

This behavior contradicts the “Input validation” claim in SKILL.md, as no substantive validation is implemented before decoding or transformation.

Attack Path

  1. An attacker invokes the skill with an oversized Base64 payload, a high-resolution image, or a compressed image with extreme decoded dimensions.
  2. The handler decodes the entire payload into a Node.js Buffer.
  3. Sharp reads attacker-controlled metadata and allocates resources to decode the image.
  4. The handler performs multiple full-image operations, including crop or extension, sharpening, modulation, blur, gamma correctio ...[truncated 897 chars]
Remediation
View remediation

Remediation Suggestions

  1. Enforce a strict request-body and encoded Base64 size limit before decoding.
  2. Validate the Base64 syntax and reject malformed input instead of permissively decoding arbitrary strings.
  3. Enforce a strict decoded-buffer size limit.
  4. Configure Sharp with an explicit input pixel limit appropriate for the deployment.
  5. Read metadata and reject images whose width, height, or total pixel count exceeds documented limits.
  6. Allowlist required input formats, such as JPEG, PNG, and WebP, and reject unsupported formats.
  7. Validate that metadata contains finite, positive integer dimensions before calculating target dimensions.
  8. Limit output dimensions and reject inputs that would produce an excessive 9:16 canvas.
  9. Wrap decoding and transformation operations in try/catch blocks and return controlled client errors for malformed or oversized images.
  10. Apply platform-level memory limits, execution timeouts, concurrency limits, and rate limiting.
  11. Consider processing untrusted images in an isolated worker with restricted resources.
  12. Update SKILL.md to document the actual accepted formats and enforced size, dimension, and pixel-count limits.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest lists generic triggers like "enhance photo" and "add watermark" without clarifying activation boundaries, exclusions, or required context. These phrases are common enough to match ordinary user speech and could cause unintended invocation of the skill.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a caret range (^0.33.2) rather than being pinned to an exact version, which allows different installs to resolve to different patch/minor releases. This weakens build reproducibility and can unexpectedly introduce vulnerable or malicious upstream changes, especially for a native module like sharp with postinstall/build behavior.

Content

Scanner excerpt · package.json (reported line 6)May include surrounding context.

json
"version": "1.0.0",
  "main": "openclaw-index.js",
  "dependencies": {
    "sharp": "^0.33.2"
  }
}

Unverifiable Dependency: sharp has 4 known advisory(ies) (GHSA-54xq-cgqr-rpm3 (sharp vulnerability in libwebp dependency CVE-2023-4863); GHSA-f88m-g3jw-g9cj (sharp inherited vulnerabilities in libvips: CVE-2026-33327, CVE-2026-33328, CVE-); CVE-2022-29256 (sharp vulnerable to Command Injection in post-installation over build environmen) +1 more), 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

The manifest references sharp without an exact pinned version, while the package family has multiple known advisories including issues in native/transitive components. Because the resolved installed version is not verifiable from this manifest alone, the skill may pull an affected release at install time, creating exposure ranging from denial of service to potentially more serious native library exploitation depending on which advisory applies.

Content

No source excerpt is available for this finding.