Back to skill

Security audit

Pose Transfer

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent image-generation purpose, but it silently disables TLS checks when downloading generated images, which makes the output vulnerable to tampering.

Review before installing. Use only images you are comfortable sending to fal.ai, run it in a constrained virtual environment, and prefer waiting for a fix that restores normal TLS verification, adds download size/content checks, and pins dependencies.

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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate.py:60
Finding

TLS Certificate and Hostname Verification Disabled for Image Downloads

Content
View full analysis

Vulnerability Details

File Location: scripts/generate.py, lines 60–69
Vulnerability Type: Improper TLS certificate validation
Risk Level: High

Vulnerable Code

python
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

req = urllib.request.Request(url)
with urllib.request.urlopen(req, context=ctx) as response:
    with open(output_path, 'wb') as f:
        f.write(response.read())
return True

Technical Analysis

The download function explicitly disables both TLS certificate verification and hostname validation. Consequently, the HTTPS connection does not authenticate the remote image server. A forged, expired, self-signed, or otherwise untrusted certificate will be accepted.

This defeats the principal server-authentication guarantee provided by TLS and permits a network-positioned attacker to impersonate the image host. The response is then written directly to a local file without content-type, file-signature, or maximum-size validation.

Attack Path

  1. The Skill submits images to the Fal service and receives a generated-image URL.
  2. The Skill passes that URL to download_image.
  3. An attacker with a network interception capability redirects or intercepts the HTTPS connection.
  4. The attacker presents an arbitrary certificate for the destination host.
  5. Because certificate and hostname checks are disabled, the client accepts the connection.
  6. The attacker supplies arbitrary response bytes.
  7. Those bytes are written to the predetermined pose_N.jpg output path and treated as generated output.

The absence of a response-size limit also allows the intercepted server to send an excessively large response, potentially exhausting memory or disk space.

Impact Assessment

A successful attacker can compromise the integrity of downloaded generated images, cause attacker-controlled content to be stored in the output directory ...[truncated 297 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the settings that disable certificate and hostname verification.

  • Use the platform-default verified TLS context:

    python
    req = urllib.request.Request(url)
    with urllib.request.urlopen(req, timeout=30) as response:
        data = response.read(MAX_IMAGE_SIZE + 1)
    
  • Reject non-HTTPS URLs.

  • Restrict downloads to documented Fal or approved CDN hostnames where operationally possible.

  • Set connection and read timeouts.

  • Enforce a maximum response size before writing the file.

  • Validate the response Content-Type against an allowlist such as image/jpeg and verify the decoded file with a trusted image-processing library.

  • Download to a temporary file and atomically move it into place only after successful validation.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:5
Finding

Third-Party Dependency Is Not Pinned to a Reviewed Version

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 5–7 and 33–36
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

Dependency declaration at lines 5–7:

yaml
dependency:
  python:
    - fal-client>=0.8.0

Installation instructions at lines 33–36:

bash
export FAL_KEY="your-fal-api-key"
pip install fal-client

Technical Analysis

The dependency declaration permits any version of fal-client at or above version 0.8.0, while the documented installation command installs the latest version available from the configured package index. There is no lockfile, exact version constraint, or package hash.

Therefore, the code installed and imported during a future deployment can differ from the version originally reviewed. If an upstream release, maintainer account, distribution channel, or configured package index is compromised, malicious package code could execute during installation or import.

This finding concerns insufficient dependency reproducibility and integrity enforcement. The reviewed project does not itself demonstrate that the current fal-client package is malicious.

Attack Path

  1. An attacker compromises an upstream package release, maintainer account, package index, or dependency distribution path.
  2. A malicious version satisfying fal-client>=0.8.0 is published or served.
  3. A user follows the documented pip install fal-client command or an automated environment resolves the broad dependency constraint.
  4. The malicious release is installed because no exact version or integrity hash is required.
  5. Package-controlled code executes during installation or when generate.py imports fal_client.
  6. The code runs with the permissions of the user executing the Skill.

Impact Assessment

A compromised dependency could access the FAL_KEY environment variable, read the source and reference images processe ...[truncated 302 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin fal-client to an exact, reviewed version instead of using a lower-bound-only constraint.
  • Maintain a lockfile that records all transitive dependency versions.
  • Require cryptographic package hashes, for example through a hash-locked requirements file and pip install --require-hashes.
  • Install packages only from a trusted, explicitly configured package index.
  • Review dependency updates before changing the pinned version.
  • Run dependency vulnerability and provenance checks in CI.
  • Install and execute the Skill in a least-privileged virtual environment or container with access limited to required files and network destinations.
  • Keep API credentials scoped and rotate FAL_KEY if dependency compromise is suspected.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

TLS verification is intentionally disabled with no user warning, so users are silently exposed to insecure network behavior. In practice, anyone able to intercept traffic can tamper with the returned image or substitute arbitrary data while the script presents the operation as a normal download.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares that it requires an API key and describes running a Python script that performs network access and writes output files, but it does not define any explicit tool scope such as permissions or allowed-tools. This creates an avoidable trust gap: an agent or reviewer cannot easily determine the intended boundaries of environment access, filesystem writes, and outbound network usage, increasing the chance of over-privileged execution or misuse.

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 description and usage heading switch to Chinese, which imposes a specific language on users without any opt-in or justification. This can violate language/locale policy when the skill does not explicitly offer alternatives or state that it is intended only for Chinese-speaking users.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The download helper explicitly disables both certificate validation and hostname checking before fetching a remote image URL. This allows a man-in-the-middle attacker or malicious network infrastructure to spoof the image host and return attacker-controlled content, which is especially risky because the script automatically saves the downloaded payload to disk without any authenticity checks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code sends base64-encoded local images to the fal-ai API via the image_urls argument, which means user-provided model/product and reference images are uploaded to a third-party service. The file contains operational logging, but it does not clearly disclose the privacy implication that image data is transmitted off-device.

Content

No source excerpt is available for this finding.