Back to skill

Security audit

ImgBB API

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward ImgBB uploader, but users should handle API keys and uploaded images carefully.

Install only if you intend to upload selected images or URLs to ImgBB and receive public/shareable links. Prefer IMGBB_API_KEY over passing keys on the command line, avoid storing sensitive images, and restrict any ~/.imgbb_api_key file permissions if you use it.

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
scripts/imgbb.py:73
Finding

Insecure API Key Handling Through Process Arguments and Plaintext Configuration

Content
View full analysis
~/.imgbb_api_key python imgbb.py image.jpg --key YOUR_KEY ``` ### Technical Analysis The `--key` and `--set-key` options accept an API credential directly as a process argument. Command-line arguments can be exposed through shell history, process inspection utilities, terminal logging, monitoring software, diagnostic collection, and audit infrastructure. This makes process arguments unsuitable for transmitting persistent secrets. The `--set-key` implementation writes the credential to `~/.imgbb_api_key` as plaintext without explicitly applying owner-only permissions. The resul ...[truncated 1834 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tainted flow: 'data' from os.environ.get (line 120, credential/environment) → requests.post (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/imgbb.py (reported line 41)May include surrounding context.

python
data = {'key': api_key}
        if name: data['name'] = name
        if expiration > 0: data['expiration'] = expiration
        response = requests.post(API_URL, files=files, data=data, timeout=30)
    return response.json()

def upload_url(image_url, api_key, name=None, expiration=0):

Tainted flow: 'data' from os.environ.get (line 38, credential/environment) → requests.post (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/imgbb.py (reported line 48)May include surrounding context.

python
data = {'key': api_key, 'image': image_url}
    if name: data['name'] = name
    if expiration > 0: data['expiration'] = expiration
    response = requests.post(API_URL, data=data, timeout=30)
    return response.json()

def upload_base64(base64_string, api_key, name=None, expiration=0):

Tainted flow: 'data' from os.environ.get (line 38, credential/environment) → requests.post (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/imgbb.py (reported line 55)May include surrounding context.

python
data = {'key': api_key, 'image': image_url}
    if name: data['name'] = name
    if expiration > 0: data['expiration'] = expiration
    response = requests.post(API_URL, data=data, timeout=30)
    return response.json()

def upload_base64(base64_string, api_key, name=None, expiration=0):

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/imgbb.py (reported line 15)May include surrounding context.

python
CONFIG_FILE = os.path.expanduser("~/.imgbb_api_key")

def get_api_key(key_param=None):
    """Get API key from parameter, env, or config file"""
    if key_param:
        return key_param

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description does not warn that local images and source URLs are sent to ImgBB, a third-party service. Users may reasonably assume a local-only transformation or link-generation step, so the missing disclosure can lead to unintended sharing of sensitive images, metadata, or internal URLs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation condition is broad enough to trigger on many ordinary requests about sharing or uploading images, which can cause the skill to activate unexpectedly. In context, that matters because the skill sends user-provided images or URLs to a third-party hosting service, so an overbroad trigger increases the chance of unintended external data disclosure.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 49)May include surrounding context.

md
import sys
from pathlib import Path

API_URL = "https://api.imgbb.com/1/upload"
CONFIG_FILE = os.path.expanduser("~/.imgbb_api_key")

def get_api_key(key_param=None):

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/imgbb.py (reported line 11)May include surrounding context.

python
import sys
from pathlib import Path

API_URL = "https://api.imgbb.com/1/upload"
CONFIG_FILE = os.path.expanduser("~/.imgbb_api_key")

def get_api_key(key_param=None):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This function uploads local image content to a third-party service without any explicit warning, confirmation, or privacy notice at the point of use. In an agent or automation context, that increases the risk of unintentionally disclosing sensitive local files, screenshots, or embedded metadata to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script stores the API key in ~/.imgbb_api_key as plaintext and does not set restrictive file permissions or warn the user about the storage risk. On multi-user systems or misconfigured environments, other local users or processes may read the credential and abuse the account.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.