Back to skill

Security audit

Thumbnail Design

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this thumbnail-design skill suspicious because its default cutout option may send the selected image to remove.bg when local processing is unavailable, without a separate authorization step; the scan was partial.

Before installing, consider whether you are comfortable with the cutout feature potentially uploading the selected image to remove.bg when local processing is unavailable and an API key is present. The scan covered all eight listed components, but was marked partial because two local path-like references were unresolved, so the evidence is incomplete.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (12)

Tainted flow: 'req' from os.environ.get (line 41, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 43)May include surrounding context.

python
host = urllib.parse.urlsplit(url).netloc
    req = urllib.request.Request(url, data=data, headers={"User-Agent": UA, **(headers or {})}, method=method)
    try:
        with urllib.request.urlopen(req, timeout=timeout) as r:
            return r.read()
    except urllib.error.HTTPError as e:
        body = ""

Direct flow: pathlib.Path.read_bytes (file read) → pathlib.Path.write_bytes (file write)

High
Category
Data Flow
Confidence
80% confidence
Finding

Data flows directly from a source (env vars, files, network) to a sink (network output, exec, file write) without intermediate validation.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 159)May include surrounding context.

python
from rembg import remove
        except ImportError:
            raise Fail("rembg is not installed: pip install \"rembg[cpu]\" (free, runs locally; downloads a model on first use).") from None
        out.write_bytes(remove(src.read_bytes()))
    elif engine == "removebg":
        key = need_key("REMOVEBG_API_KEY")
        body, ctype = multipart({"size": "auto", "format": "png"}, {"image_file": (src.name, src.read_bytes())})

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

File contents are required to remain in English without user opt-in.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

Although replies follow the user's language preference, the instruction separately requires all file contents to stay in English. This imposes a language on generated deliverables, potentially including thumbnail text, without user choice or a documented technical justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/tools-and-apis.md (reported line 13)May include surrounding context.

md
stock photos (`thumb_assets.py search`) | verified: 200 requests/hour, 20,000/month, credit the creator/Pexels when possible |
| Pixabay API | free stock photos (`--source pixabay`) | verified: 100 requests/60 s, cache 24 h, no bulk downloading; photo downloads from this script top out near 1280 px |
| rembg (local) | free background removal, `pip install "rembg[cpu]"` | not verified here; default engine for cutouts |
| remove.bg API | background removal (`--engine removebg`) | verified: `POST https://api.remove.bg/v1.0/removebg`, header `X-Api-Key`, first 50 API calls per month free. **remove.bg says its standalone website closes on 1 Dec 2026 and background removal moves to Canva and Leonardo.ai; check what that means for the API before depending on it.** |
| OpenAI Image API | optional AI backgrounds/objects (`ai-image`) | verified: image generations endpoint, base64 in `data[0].b64_json`, model names change (docs showed `gpt-image-2.5-*` and `2.6` references), may need organizatio

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 76)May include surrounding context.

python
if a.source == "auto":  # use whichever free key exists (Pexels paused new keys at times)
        a.source = "pexels" if os.environ.get("PEXELS_API_KEY", "").strip() else "pixabay"
    if a.source == "pexels":
        url = "https://api.pexels.com/v1/search" + urllib.parse.urlencode(
            {"query": a.query, "orientation": "landscape", "per_page": a.count})
        data = json.loads(http(url, {"Authorization": need_key("PEXELS_API_KEY")}))
        for p in data.get("photos", []):

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The default cutout engine is auto, which silently falls back to remove.bg when rembg is unavailable and REMOVEBG_API_KEY exists. This uploads the entire selected file without a separate authorization step, potentially disclosing private creator photos or other sensitive inputs when the user expected local processing.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 163)May include surrounding context.

python
elif engine == "removebg":
        key = need_key("REMOVEBG_API_KEY")
        body, ctype = multipart({"size": "auto", "format": "png"}, {"image_file": (src.name, src.read_bytes())})
        out.write_bytes(http("https://api.remove.bg/v1.0/removebg", {"X-Api-Key": key, "Content-Type": ctype}, data=body,
                             timeout=120, method="POST"))
        print("Note: remove.bg announced that its standalone website closes on 1 Dec 2026 and background removal moves to "
              "Canva and Leonardo.ai; check remove.bg's notice for what that means for the API.")

Tainted flow: 'ctype' from pathlib.Path.read_bytes (line 162, file read) → pathlib.Path.write_bytes (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 163)May include surrounding context.

python
elif engine == "removebg":
        key = need_key("REMOVEBG_API_KEY")
        body, ctype = multipart({"size": "auto", "format": "png"}, {"image_file": (src.name, src.read_bytes())})
        out.write_bytes(http("https://api.remove.bg/v1.0/removebg", {"X-Api-Key": key, "Content-Type": ctype}, data=body,
                             timeout=120, method="POST"))
        print("Note: remove.bg announced that its standalone website closes on 1 Dec 2026 and background removal moves to "
              "Canva and Leonardo.ai; check remove.bg's notice for what that means for the API.")

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 183)May include surrounding context.

python
if not model:
        raise Fail("Give --model or set THUMB_IMAGE_MODEL (model names change; see the provider's image-generation guide).")
    body = json.dumps({"model": model, "prompt": a.prompt, "size": a.size, "n": 1}).encode()
    raw = http("https://api.openai.com/v1/images/generations",
               {"Authorization": f"Bearer {key}", "Content-Type": "application/json"}, data=body, timeout=300,
               method="POST")
    try:

Tainted flow: 'b64' from os.environ.get (line 187, credential/environment) → pathlib.Path.write_bytes (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/thumb_assets.py (reported line 193)May include surrounding context.

python
"some image models require organization verification.") from None
    out = Path(a.out)
    out.parent.mkdir(parents=True, exist_ok=True)
    out.write_bytes(base64.b64decode(b64))
    w, h = Image.open(out).size
    print(f"Wrote {out} ({w}x{h}). Each call is billed; AI-drawn text is often wrong, so add text with thumb_compose.py.")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/thumb_compose.py (reported line 89)May include surrounding context.

python
return name
    if name and shutil.which("fc-match"):
        try:
            out = subprocess.run(["fc-match", "-f", "%{file}", f"{name}:bold"], capture_output=True, text=True,
                                 timeout=10).stdout.strip()
            if out and Path(out).exists() and name.split()[0].lower() in Path(out).name.lower():
                return out

Activation extends to a pasted title or script without requiring thumbnail-related intent.

Low
Category
Trigger Abuse
Confidence
94% confidence
Finding

The phrase "even if they only paste a title or script" allows activation without an explicit thumbnail request or established thumbnail-design context. Titles and scripts can also be submitted for editing, summarization, or other unrelated tasks.

Content

No source excerpt is available for this finding.