Back to skill

Security audit

GeoInfer Image Geolocation

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its stated GeoInfer image-geolocation purpose, but it can upload any readable local file to an external API without strong validation or an explicit upload warning.

Install only if you are comfortable sending chosen local images to GeoInfer using your GEOINFER_API_KEY. Treat the image path as sensitive: do not let untrusted prompts choose file paths, and avoid using this skill on private photos or non-image files until it adds MIME/type checks, size enforcement, and a clear upload confirmation or warning.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/predict.sh:16
Finding

Unrestricted Local File Upload to an External Service

Content
View full analysis
&2 exit 1 fi # 3. Check for API key if [ -z "${GEOINFER_API_KEY:-}" ]; then echo "Error: GEOINFER_API_KEY is required. Set it with: export GEOINFER_API_KEY=\"your_key\"" >&2 exit 1 fi # 4. Validate top_n range if [ "$TOP_N" -lt 1 ] || [ "$TOP_N" -gt 15 ] 2>/dev/null; then echo "Error: top_n must be between 1 and 15." >&2 exit 1 fi # 5. Run prediction curl -s -X POST "https://api.geoinfer.com/v1/prediction/predict?model_id=${MODEL_ID}&top_n=${TOP_N}" \ -H "X-GeoInfer-Key: $GEOINFER_API_KEY" \ -F "file=@${IMAGE_PATH}" ``` ### Technical Analysis The script only checks whether the supplied path resolves to a regular file using `-f`. It does not verify that the file is an image, inspect its actual MIME type or file signature, enforce the documented 10 MB limit, restrict access to an approved input directory, or reject symbolic links where appropriate. Consequently, any readable regular file can be submitted to the external GeoInfer API. This behavior exceeds the minimum file-access privileges necessary for image geolocation. Extension-only validation would not be sufficient because a sensitive file can be renamed; validation should use both size limits and content-derived file types. The external transmission itself is part of the declared functionality when the selected file is a legitimate image. The vulnerability is that the implementation does not constrain which local files can be transmitted. ### Attack Path 1. An attacker, untrusted prompt, or other untrusted input influences the `IMAGE_PATH` argument. 2. The attacker supplies a path to a readable sensitive file, or a symbolic link resolving to one. 3. ...[truncated 829 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/credits.sh:10
Finding

API Key Exposed Through Curl Process Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose says the skill performs AI image geolocation via visual analysis. However, the supplied code only validates the presence of GEOINFER_API_KEY and calls the /v1/credits/summary endpoint to fetch account credit balance information. This is a materially different primary purpose and an undeclared capability related to account usage/billing status, not image geolocation. Therefore, the description does not accurately represent the code's behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose says the skill geolocates images via visual analysis. However, the code does not accept or process any image input, perform inference, or return geolocation results. Its sole function is to query the GeoInfer service for available prediction models. While requiring GEOINFER_API_KEY is consistent with using the GeoInfer API, the actual behavior is materially different from the stated primary purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises shell-based scripts but does not declare any explicit tool scope such as permissions or allowed-tools. That makes execution boundaries unclear and can allow an agent to invoke shell capabilities more broadly than a user would reasonably expect, increasing the risk of unintended command execution or file access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Broad trigger language can cause the skill to activate in contexts the user did not specifically intend, especially for image-related or location-related requests. In a skill that can execute shell scripts and send local images to an external API, accidental invocation increases the chance of unintended data transfer or unnecessary external actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The phrase 'Geolocate any image' is overbroad and promotional, which can act as a catch-all trigger rather than a bounded capability statement. In context, this is more dangerous because the skill handles potentially sensitive local images and transmits them to a third-party service, so over-invocation can expose private data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill does not warn users that local image files are sent to an external geolocation service for processing. This omission is significant because images may contain highly sensitive visual information even without EXIF, and users may not realize their local files leave the environment when invoking the tool.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a skill for geolocating images via visual analysis, but this script implements account-credits retrieval from the GeoInfer service. Checking billing or usage status is operational/account-management functionality, not an obvious requirement of performing image geolocation itself.

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 · scripts/credits.sh (reported line 11)May include surrounding context.

sh
fi

# 2. Fetch models
curl -s -X GET "https://api.geoinfer.com/v1/prediction/models" \
    -H "X-GeoInfer-Key: $GEOINFER_API_KEY"

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

sh
fi

# 2. Fetch models
curl -s -X GET "https://api.geoinfer.com/v1/prediction/models" \
    -H "X-GeoInfer-Key: $GEOINFER_API_KEY"

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/predict.sh (reported line 37)May include surrounding context.

sh
fi

# 2. Fetch models
curl -s -X GET "https://api.geoinfer.com/v1/prediction/models" \
    -H "X-GeoInfer-Key: $GEOINFER_API_KEY"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code performs a network POST that transmits the supplied image file to an external API and includes a credential in the request header. Although the code validates inputs, it does not print, prompt, or otherwise disclose at execution time that local file contents will be sent off-host.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.