Back to skill

Security audit

Google Cloud Translate Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill performs translation as advertised, but its Google-branded presentation conflicts with its actual SocketsIO data flow and includes an unsafe endpoint override that can redirect API keys and translated text.

Review this before installing or using with sensitive content. Treat it as a SocketsIO translation client, not a direct Google Cloud Translation client, and do not send confidential, regulated, or secret text unless SocketsIO is approved for that data. Avoid setting SOCKETSIO_API_BASE unless you fully control the endpoint, because it can receive your API key and submitted text.

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/translate.py:21
Finding

User-Controlled API Endpoint Can Expose API Credentials and Submitted Content

Content
View full analysis

Vulnerability Details

File Location: scripts/translate.py, lines 21 and 25–35
Vulnerability Type: Unvalidated destination override for authenticated API requests
Risk Level: Medium

Vulnerable Code

python
API_BASE = os.environ.get("SOCKETSIO_API_BASE", "https://api.socketsio.com")
API_KEY = os.environ.get("SOCKETSIO_API_KEY", "")


def _request(method, path, data=None):
    if not API_KEY:
        print("Error: SOCKETSIO_API_KEY not set.", file=sys.stderr)
        print("Get a free key: https://socketsio.com/signup", file=sys.stderr)
        sys.exit(1)

    url = f"{API_BASE}{path}"
    headers = {
        "X-API-Key": API_KEY,
        "Content-Type": "application/json",
    }
    body = json.dumps(data).encode() if data else None
    req = urllib.request.Request(url, data=body, headers=headers, method=method)

The resulting request is issued at lines 38–39:

python
with urllib.request.urlopen(req, timeout=30) as resp:
    return json.loads(resp.read())

Technical Analysis

The undocumented SOCKETSIO_API_BASE environment variable controls the complete origin used for every API request. The value is concatenated directly with an API path without parsing the URL, enforcing HTTPS, or verifying that the hostname is the intended api.socketsio.com service.

At the same time, _request() unconditionally places SOCKETSIO_API_KEY in the X-API-Key header. Translation and language-detection requests also include user-supplied text in the JSON body. Consequently, a malicious or incorrectly inherited environment can redirect authenticated requests—and their potentially confidential content—to an arbitrary server.

This is an insecure trust-boundary design rather than hidden exfiltration: under the default configuration, requests go to the documented SocketsIO service. Exploitation requires influence over the process environment or launch configuration.

Attack P

...[truncated 1393 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the runtime endpoint override and hard-code the production origin:

    python
    API_BASE = "https://api.socketsio.com"
    
  2. If endpoint configurability is operationally necessary, parse and strictly validate it before constructing requests:

    • Require the https scheme.
    • Require the exact approved hostname.
    • Reject embedded credentials, fragments, unexpected ports, and deceptive hostnames.
    • Construct URLs with urllib.parse rather than direct string concatenation.
  3. Enforce the allowlist immediately before attaching the API key so future refactoring cannot send credentials to an untrusted origin.

  4. Separate development and production credentials. Permit custom endpoints only through an explicit development mode that refuses to attach production API keys.

  5. Document the endpoint override and its security implications if it remains supported.

  6. Add automated tests confirming that values such as http://..., https://attacker.example, https://api.socketsio.com.attacker.example, and URLs with unexpected ports are rejected before network access occurs.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Tainted flow: 'req' from os.environ.get (line 40, 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/translate.py (reported line 43)May include surrounding context.

python
req = urllib.request.Request(url, data=body, headers=headers, method=method)

    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            return json.loads(resp.read())
    except urllib.error.HTTPError as e:
        err = json.loads(e.read()) if e.headers.get("content-type", "").startswith("application/json") else {"error": str(e)}

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is branded and described as using Google Cloud Translation API, but the implementation routes traffic to SocketsIO and requires a SocketsIO API key. This is dangerous because it can mislead operators about where sensitive text is sent, what vendor processes it, and what contractual, privacy, or compliance controls actually apply.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The inline docstring describes the tool as a Google Cloud Translate wrapper, while the implementation is a SocketsIO client. This mismatch can mislead operators and downstream agents into sending sensitive text under false assumptions about the destination service, retention, and contractual controls, which is especially risky for translation workflows that often process private content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill advertises Google Cloud Translation API usage, but the code actually sends data to SocketsIO endpoints using a SocketsIO API key. This is a supply-chain transparency and data-handling vulnerability because users may believe text is sent to Google when it is instead transmitted to a different provider, affecting trust, consent, compliance, and vendor risk assessment.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documents use of network access and environment variables but does not declare tool scope or permissions. This weakens least-privilege controls and can cause users or platforms to approve a skill without understanding that it will read API keys from the environment and send data to external services.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest claims direct use of Google Cloud Translation, while the examples show all requests going to SocketsIO endpoints. This service identity mismatch can cause unsafe trust decisions, especially where users allow one provider but not another for handling potentially sensitive text.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The title and opening framing present the skill as Google Cloud Translate, but later sections reveal it is a SocketsIO replacement API. Misleading identity and branding increase the chance that users will input confidential content under false assumptions about the processing party and security posture.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation encourages users to submit arbitrary text for translation without warning that the content leaves the local system and is sent to a third-party API. This creates privacy and compliance risk if users paste secrets, personal data, internal documents, or regulated information into translation requests.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The signup example sends user email and password to an external endpoint. External transmission itself is expected for account creation, but it is still security-relevant because it encourages credential submission to a third-party service not clearly identified in the branding, increasing phishing, trust, and data-handling risk.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

Get a free API key (500K credits, never expire):

bash
curl -X POST https://api.socketsio.com/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"yourpassword"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The signup example sends user email and password to an external endpoint. External transmission itself is expected for account creation, but it is still security-relevant because it encourages credential submission to a third-party service not clearly identified in the branding, increasing phishing, trust, and data-handling risk.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

Get a free API key (500K credits, never expire):

bash
curl -X POST https://api.socketsio.com/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"yourpassword"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The translation example sends user-provided text to an external API endpoint. In a translation skill this is contextually expected, but it remains dangerous if users are not warned because the content may contain confidential, proprietary, or regulated information and is transmitted off-system to a third party.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

Translate text to any of 195 languages. Auto-detects source language.

bash
curl -X POST https://api.socketsio.com/v1/translate \
  -H "X-API-Key: $SOCKETSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "Hello, how are you?", "target": "zh"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The language-detection example transmits arbitrary input text to an external service. Although normal for SaaS language detection, the skill does not explain off-system transfer or safe-use boundaries, so users may unknowingly submit sensitive text for analysis.

Content

Scanner excerpt · SKILL.md (reported line 57)May include surrounding context.

Identify the language of any text with confidence score.

bash
curl -X POST https://api.socketsio.com/v1/detect \
  -H "X-API-Key: $SOCKETSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "Bonjour le monde"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The bulk translation workflow increases the volume of external data transmission and can amplify privacy impact by sending many messages in one request. If users batch internal or customer content, a single call can expose a large corpus to a third-party service without adequate disclosure.

Content

Scanner excerpt · SKILL.md (reported line 68)May include surrounding context.

Translate up to 128 texts in a single call.

bash
curl -X POST https://api.socketsio.com/v1/translate \
  -H "X-API-Key: $SOCKETSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": ["Hello", "Goodbye", "Thank you"], "target": "es"}'

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

Get all 195 supported languages with display names.

bash
curl https://api.socketsio.com/v1/languages \
  -H "X-API-Key: $SOCKETSIO_API_KEY"

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

Get all 195 supported languages with display names.

bash
curl https://api.socketsio.com/v1/languages \
  -H "X-API-Key: $SOCKETSIO_API_KEY"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script transmits arbitrary user-supplied text and an API credential to an external service without any explicit warning, consent prompt, or privacy notice at the point of use. In the context of a translation skill, users may paste confidential, regulated, or proprietary text, so silent exfiltration to a third party meaningfully increases privacy and compliance risk.

Content

No source excerpt is available for this finding.