Back to skill

Security audit

Easydoc Extract

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but its helper can send documents and the API key to an arbitrary base URL if invoked with that option.

Review before installing. Use this only for documents you are authorized to send to EasyLink, keep EASYLINK_API_KEY in a secure environment variable, and avoid --base-url unless you are deliberately testing in a controlled environment. Prefer restricting outbound access to api.easylink-ai.com and rotate the API key if it may have been sent to an unintended endpoint.

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
scripts/easydoc_extract.py:104
Finding

Arbitrary API Base URL Allows Disclosure of Documents and API Credentials

Content
View full analysis
Dict: url = f"{base_url.rstrip('/')}{SUBMIT_PATH}" form_fields: List[Tuple[str, str]] = [("mode", mode)] if mode in UNIVERSAL_MODES: if custom_fields: properties = {field: {"type": "string"} for field in custom_fields} schema = json.dumps( {"type": "object", "properties": properties}, ensure_ascii=False ) form_fields.append(("json_schema", schema)) elif custom_prompt: form_fields.append(("prompt_cus", custom_prompt)) payload, boundary = encode_multipart( fields=form_fields, files=[(FILE_FIELD, fp) for fp in file_paths], ) headers = { "api-key": api_key, "Content-Type": f"multipart/form-data; boundary={boundary}", } return http_json("POST", url, headers=headers, body=payload, timeout=timeout) ``` ```python def query_task( api_key: str, base_url: str, task_id: str, timeout: int = 60, retries: int = 0, ) -> Dict: path = RESULT_PATH.format(task_id=task_id) url = f"{base_url.rstrip('/')}{path}" headers = {"api-key": api_key} return http_json("GET", url, headers=headers, timeout=timeout, retries=retries) ``` ```python api_key = resolve_api_key(args.api_key) base_url = args.base_url.strip() or BASE_URL ``` ### Technical Analysis The helper accepts an unrestricted ...[truncated 2453 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (14)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares environment and executable requirements and clearly instructs use of local files and outbound HTTP requests, but it does not define an explicit tool scope such as allowed-tools or permissions. That omission weakens least-privilege controls and can allow the agent runtime to grant broader file, network, or environment access than the skill actually needs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is designed to upload user documents to a third-party API for extraction, but the description and workflow do not prominently warn users that document contents and extracted fields leave the local environment. This creates a privacy and consent risk, especially because documents like licenses and certificates often contain sensitive personal or business data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This command uploads a local document to an external domain, which is an intentional data exfiltration path from the local environment to a third-party service. In this skill context that behavior is expected, but it is still security-relevant because the uploaded file may contain sensitive information and the API key is used to authorize the transfer.

Content

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

Open extraction (auto-detect all fields):

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: $EASYLINK_API_KEY" \
  -F "files=@doc.pdf" \
  -F "mode=easydoc-extract"

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This example sends a document plus a custom schema to an external API, so both document contents and extraction intent are disclosed to a third party. While aligned with the skill's purpose, it remains a true data-transfer risk because structured extraction often targets sensitive fields like names, dates, and amounts.

Content

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

Closed extraction with custom fields:

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: $EASYLINK_API_KEY" \
  -F "files=@doc.pdf" \
  -F "mode=easydoc-extract" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This example uploads a business license image to a third-party service, which is particularly sensitive because business licenses can contain registration numbers, addresses, and legal entity data. The transmission is intentional, but without strong disclosure and consent controls it exposes regulated or confidential business information.

Content

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

Business license:

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: $EASYLINK_API_KEY" \
  -F "files=@license.jpg" \
  -F "mode=bl-extract"

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This command uploads an organization-code certificate image to an external service, creating a direct path for potentially sensitive corporate or regulatory data to leave the environment. The skill context makes the transfer expected, but not harmless; users need clear notice and bounded network permissions.

Content

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

Org-code certificate:

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: $EASYLINK_API_KEY" \
  -F "files=@cert.jpg" \
  -F "mode=occ-extract"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs users to upload documents to a third-party remote API but does not warn that files may contain sensitive personal, financial, or corporate data. In a document-extraction skill, omission of a data-transmission/privacy warning increases the risk of users unknowingly sending regulated or confidential content off-platform.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This example explicitly sends a local document file to an external HTTPS endpoint. In the context of document extraction, the transmission is expected functionality, but it is still security-relevant because it may exfiltrate sensitive document contents if users are not clearly informed or if the skill is invoked on confidential files.

Content

Scanner excerpt · references/easydoc-extract-api.md (reported line 70)May include surrounding context.

Open extraction:

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: your_apikey_here" \
  -F "files=@doc.pdf" \
  -F "mode=easydoc-extract"

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The closed-extraction example uploads a document to an external service, which creates the same confidentiality risk as other submit examples. Although the behavior is intentional, the skill context involves potentially sensitive extracted fields such as names and amounts, making the lack of warning more concerning.

Content

Scanner excerpt · references/easydoc-extract-api.md (reported line 79)May include surrounding context.

Closed extraction:

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: your_apikey_here" \
  -F "files=@doc.pdf" \
  -F "mode=easydoc-extract" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This example uploads a business license image to a third-party API, which can expose sensitive business identifiers and registration details. The transmission is part of intended functionality, but without a warning or consent language it presents a real privacy and compliance risk.

Content

Scanner excerpt · references/easydoc-extract-api.md (reported line 89)May include surrounding context.

Business license:

bash
curl -X POST "https://api.easylink-ai.com/v1/easydoc/extract" \
  -H "api-key: your_apikey_here" \
  -F "files=@license.jpg" \
  -F "mode=bl-extract"

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 137)May include surrounding context.

GET /v1/easydoc/extract/{task_id}

bash
curl -X GET "https://api.easylink-ai.com/v1/easydoc/extract/b_extract_xxx" \
  -H "api-key: your_apikey_here"

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 · references/easydoc-extract-api.md (reported line 100)May include surrounding context.

GET /v1/easydoc/extract/{task_id}

bash
curl -X GET "https://api.easylink-ai.com/v1/easydoc/extract/b_extract_xxx" \
  -H "api-key: your_apikey_here"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script uploads local document contents to an external EasyLink API, but it does not provide an explicit user-facing warning at the point of use that files will leave the local environment and be transmitted to a third party. Because this skill is specifically for document extraction, users may pass sensitive PDFs or images containing PII, financial, or business data; silent transmission increases the risk of unintended data disclosure and policy/compliance violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The reference describes use of an API key in headers and environment variables but gives no guidance about secret handling, rotation, or avoiding exposure in logs, screenshots, or source control. This can lead to accidental credential leakage, especially when users copy examples into scripts or shell history.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.