Back to skill

Security audit

Upstage Document Parse

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Upstage document-parsing helper that sends chosen documents to Upstage’s API, with privacy considerations users should understand before use.

Install only if you are comfortable sending selected documents to Upstage for processing. Avoid uploading confidential, regulated, or highly sensitive files unless your organization permits that use of Upstage and you understand the remote retention behavior for async results.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (15)

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill clearly uploads user-supplied documents to the Upstage API, but the user-facing guidance does not prominently warn that document contents leave the local environment and are sent to a third-party service. This can cause unintended disclosure of sensitive files if users or calling agents assume processing is local.

External Transmission

Medium
Category
Data Exfiltration
Content
import requests

with open("report.pdf", "rb") as f:
    response = requests.post(
        "https://api.upstage.ai/v1/document-digitization",
        headers={"Authorization": f"Bearer {os.environ['UPSTAGE_API_KEY']}"},
        files={"document": f},
Confidence
95% confidence
Finding
This code performs an external HTTP POST that transmits the full document to a third-party API for parsing. In the context of document processing, uploaded files may contain confidential, regulated, or proprietary content, so undisclosed external transmission creates a real privacy and data governance risk.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("report.pdf", "rb") as f:
    response = requests.post(
        "https://api.upstage.ai/v1/document-digitization",
        headers={"Authorization": f"Bearer {os.environ['UPSTAGE_API_KEY']}"},
        files={"document": f},
        data={"model": "document-parse", "output_formats": "['markdown']"}
Confidence
90% confidence
Finding
The hardcoded external endpoint confirms that document content is sent to Upstage infrastructure rather than processed locally. That is expected for this integration, but it is still security-relevant because users may expose sensitive document contents to an external processor if the skill does not clearly disclose that behavior.

External Transmission

Medium
Category
Data Exfiltration
Content
## Submit Request

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization/async" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@large.pdf" \
  -F "model=document-parse" \
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Submit Request

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization/async" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@large.pdf" \
  -F "model=document-parse" \
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Submit Request

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization/async" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@large.pdf" \
  -F "model=document-parse" \
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Submit Request

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization/async" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@large.pdf" \
  -F "model=document-parse" \
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Submit Request

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization/async" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@large.pdf" \
  -F "model=document-parse" \
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# 1. Submit async request
with open("large.pdf", "rb") as f:
    r = requests.post(
        "https://api.upstage.ai/v1/document-digitization/async",
        headers={"Authorization": f"Bearer {api_key}"},
        files={"document": f},
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The examples explicitly upload local files such as PDFs and invoices to a third-party API but do not warn users that document contents will leave the local environment. Because this skill is specifically about document parsing, users may submit sensitive business, financial, or personal documents and overlook the privacy, compliance, and data handling implications.

External Transmission

Medium
Category
Data Exfiltration
Content
### Extract Markdown

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@report.pdf" \
  -F "model=document-parse" \
Confidence
89% confidence
Finding
This example sends a local document to an external HTTPS endpoint, which is expected behavior for a cloud parsing API, but it still creates a real data exfiltration path for any file the user supplies. In the context of documentation, the issue is not hidden malware but the absence of disclosure and safeguards around transmitting potentially sensitive document contents off-device.

External Transmission

Medium
Category
Data Exfiltration
Content
### Enhanced Mode for Complex Documents

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@complex.pdf" \
  -F "model=document-parse" \
Confidence
89% confidence
Finding
This command uploads a local file named complex.pdf to the Upstage API, so any embedded sensitive text, tables, or images are transmitted externally. Although this is consistent with the product's purpose, users are not warned about the resulting privacy and compliance risks, which makes the example unsafe in practice for unaware users.

External Transmission

Medium
Category
Data Exfiltration
Content
### Force OCR for Scanned Documents

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@scan.pdf" \
  -F "model=document-parse" \
Confidence
89% confidence
Finding
The scanned-document OCR example transmits scan.pdf to an external service, which may include highly sensitive scanned records like IDs, contracts, or medical paperwork. Since the example lacks any warning about off-system processing, it could cause unintentional exposure of sensitive scanned content.

External Transmission

Medium
Category
Data Exfiltration
Content
### Extract Table Images as Base64

```bash
curl -X POST "https://api.upstage.ai/v1/document-digitization" \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -F "document=@invoice.pdf" \
  -F "model=document-parse" \
Confidence
92% confidence
Finding
This example uploads invoice.pdf to a remote API and additionally requests base64-encoded table extraction, which may increase the amount of structured sensitive financial data returned and handled. Invoices commonly contain PII, account details, and billing information, so the lack of explicit privacy warning makes this more dangerous in context.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The description embeds Korean example invocations alongside English ones, which introduces a language-specific interaction pattern without stating whether the skill is multilingual, user-selectable, or region-specific. Under the policy, language constraints or preferences should be optional or clearly justified rather than implicitly imposed.

Static analysis

No suspicious patterns detected.