Back to skill

Security audit

VIN Recognition OCR - VIN识别

Security checks for vulnerabilities and agentic risk

Overview

This VIN OCR skill is mostly coherent, but its local file handling can unintentionally send non-image local files to a third-party API through symlinks.

Review before installing. Use this only in a controlled working directory with images you intentionally want to send to JisuAPI, avoid passing paths that may be symlinks, and prefer base64 input from a known image. The publisher should fix path canonicalization, reject symlinks, validate image type and size locally, and add a clearer privacy notice for third-party processing.

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

Error
Location
vinrecognition.py:30
Finding

Symbolic-Link Bypass Allows Unintended Local File Disclosure to an External API

Content
View full analysis
Dict[str, Any]: """ 规范化并限制本地文件路径,只允许在当前工作目录及其子目录内读取。 禁止绝对路径和目录穿越(包含 ..),避免被恶意提示利用读取任意系统文件。 """ if not user_path: return { "error": "invalid_param", "message": f"field '{field}' is empty", } if os.path.isabs(user_path): return { "error": "invalid_path", "message": f"Absolute path is not allowed for '{field}'", } norm = os.path.normpath(user_path) if norm.startswith("..") or norm == "..": return { "error": "invalid_path", "message": f"Path traversal is not allowed for '{field}'", } base = os.getcwd() full = os.path.join(base, norm) return {"error": None, "path": full, "relative": norm} ``` ```python path = safe["path"] if not os.path.isfile(path): return {"pic": None, "error": f"File not found: {safe['relative']}"} try: with open(path, "rb") as f: raw = f.read() except Exception as e: return {"pic": None, "error": f"Failed to read file: {e}"} try: encoded = base64.b64encode(raw).decode("utf-8") except Exception as e: return {"pic": None, "error": f"Failed to base64-encode file: {e}"} ``` ```python result = _call_vin_api(appkey, pic_info["pic"]) print(json.dumps(result, ensure_ascii=False, indent=2)) ``` The encoded content is transmitted by `_call_vin_api` as follows: ```python VIN_RECOG_URL = "https://api.jisuapi.com/vinrecognition/recognize" def _call_vin_api(appkey: str, pic_base64: str) -> Dict[str, Any]: params = {"appkey": appkey} data = {"pic": pic_base64} try: resp = requests.post(VIN_RECOG_URL, params=params, da ...[truncated 2699 chars]
Remediation
View remediation
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill requires environment access for an API key and makes outbound network requests, but the manifest does not declare any explicit tool scope such as permissions or allowed-tools. This weakens reviewability and runtime containment because users and platform controls cannot clearly see or limit the skill's actual capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill sends vehicle VIN images to a third-party API service but does not present a user-facing privacy warning or consent notice. VINs and associated vehicle documents can be sensitive, and silent transmission to an external provider creates privacy, compliance, and user-trust risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring presents the skill description and API reference exclusively in Chinese, while the file otherwise mixes English and Chinese. For a general-purpose skill, this imposes a locale/language choice without any user opt-in or documented region-specific justification, which matches the language-policy concern for natural-language content.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The skill transmits image data, potentially containing VINs and surrounding vehicle information, to an external third-party API. Even though this is necessary for the OCR function and uses HTTPS, it still creates a real data-exposure boundary: sensitive user-provided content leaves the local environment and is subject to third-party handling, retention, and compliance risks.

Content

Scanner excerpt · vinrecognition.py (reported line 17)May include surrounding context.

python
import requests


VIN_RECOG_URL = "https://api.jisuapi.com/vinrecognition/recognize"


def _normalize_local_path(user_path: str, field: str) -> Dict[str, Any]:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes a VIN image recognition skill, but the implementation also depends on reading a secret from the process environment. Accessing environment-held credentials is not mentioned in the stated purpose and is not an obvious user-facing VIN OCR capability.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes this skill as recognizing VIN images and returning VIN plus brand/manufacturer-related information. However, the documentation's recommended usage says the agent may additionally use a vin/query interface to obtain more detailed vehicle configuration information, which expands beyond OCR recognition into vehicle data lookup.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.