other
- Location
scripts/tools.py:17- Finding
ID-card images are transmitted to a third-party API without an explicit consent step
- Content
View full analysis
Vulnerability Details
File Location:
scripts/tools.py:17-21,scripts/tools.py:36-40,scripts/call_api.py:50-75, and the missing consent requirement inSKILL.md:8-106
Vulnerability Type: Undisclosed Sensitive Data Transmission
Risk Level: HighComplete Code Snippet
scripts/tools.py:17-21:python arguments = { "dataUrl": dataUrl } return call_api("1826285519177738", "ocr_id_card", arguments)scripts/tools.py:36-40:python arguments = { "dataBase64": dataBase64 } return call_api("1826285519177738", "ocr_id_card_for_data_base64", arguments)scripts/call_api.py:50-75:python url = f"{settings.base_url}/api" mcp_id = mcp_id or settings.mcp_id api_key = get_api_key() if not api_key: raise UpstreamError("API密钥未设置,请先调用 set_api_key()") headers = { "XBY-APIKEY": api_key, "func": tool_name, "mcpid": mcp_id, "Content-Type": "application/json", } # data = {k: str(v) if v is not None else "" for k, v in params.items()} t0 = time.time() try: resp = self._session.post( url=url, headers=headers, data=json.dumps(params), timeout=settings.timeout_seconds, )Technical Analysis
The two OCR functions forward either an ID-card image URL or the complete Base64-encoded image to
https://mcp.xiaobenyang.com/api. Such images may expose a person's name, address, date of birth, national identification number, issuing authority, photograph, and document validity period.HTTPS protects the data in transit, but it does not address whether the user has been adequately informed that the document is being disclosed to an external service. The documented workflo ...[truncated 1638 chars]
- Remediation
View remediation
Remediation Suggestions
- Require affirmative consent immediately before each document upload.
- Clearly disclose the external recipient, endpoint, transmitted data, processing purpose, retention period, deletion procedure, and privacy policy.
- Do not treat API-key enrollment as consent to transmit a specific identity document.
- Minimize transmitted data by cropping or redacting fields that are not required for the requested operation.
- Offer local OCR or an explicitly configured trusted endpoint where practical.
- Define and enforce retention and deletion requirements with the service provider.
- Avoid logging request bodies, Base64 input, document URLs, OCR results, or identification numbers.
- Add a confirmation gate such as: “This image will be sent to the configured Xiaobenyang service for processing. Continue?”
- Validate that the endpoint remains HTTPS and document the trust boundary in
SKILL.md.
