Back to skill

Security audit

HTML to PDF

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only skill for using a third-party PDF API; it does not run code, but users should understand that API use sends chosen documents, URLs, and content to pdfapihub.com.

Install only if you intend to use PDF API Hub. Before applying the examples to real documents, confirm that you are allowed to send those files, URLs, passwords, signatures, and extracted data to pdfapihub.com, review retention/deletion expectations, and confirm delete/unlock actions before running copied code.

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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (30)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documents upload, delete, and unlock/decrypt capabilities, but it does not prominently warn that these operations can expose sensitive documents to a third-party service, remove files, or weaken document protections. In an agent context, omission of explicit privacy and destructive-action warnings can lead users or downstream agents to perform risky actions without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 61)May include surrounding context.

md
results = []
for inv in invoices:
    resp = requests.post(
        f"{BASE_URL}/generatePdf",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 96)May include surrounding context.

md
results = []
for inv in invoices:
    resp = requests.post(
        f"{BASE_URL}/generatePdf",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 193)May include surrounding context.

md
results = []
for inv in invoices:
    resp = requests.post(
        f"{BASE_URL}/generatePdf",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 322)May include surrounding context.

md
results = []
for inv in invoices:
    resp = requests.post(
        f"{BASE_URL}/generatePdf",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 359)May include surrounding context.

md
results = []
for inv in invoices:
    resp = requests.post(
        f"{BASE_URL}/generatePdf",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 80)May include surrounding context.

md
# Optionally merge all invoices into one
if len(results) > 1:
    merge_resp = requests.post(
        f"{BASE_URL}/pdf/merge",
        headers=HEADERS,
        json={"urls": results, "output_format": "url", "output_filename": "all-invoices.pdf"},

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 109)May include surrounding context.

md
pdf_url = gen["pdf_url"]

# Step 2: Add watermark
wm = requests.post(
    f"{BASE_URL}/watermark",
    headers=HEADERS,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The example hardcodes a concrete PDF password in documentation, encouraging insecure secret-handling practices and likely password reuse in copied code. In a document-security workflow, embedding the protection password directly in source materially weakens the protection being demonstrated.

Content

Scanner excerpt · advanced.md (reported line 124)May include surrounding context.

md
watermarked_url = wm["pdf_url"]

# Step 3: Lock with password
locked = requests.post(
    f"{BASE_URL}/lockPdf",
    headers=HEADERS,
    json={

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The OCR example demonstrates uploading a scanned bank statement to a third-party API without any warning that highly sensitive financial documents and extracted text leave the user's environment. In a skill focused on document automation, this omission is material because users may copy the example directly for PII/financial records without considering privacy, retention, or compliance obligations.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 146)May include surrounding context.

python
# Step 1: OCR the scanned PDF
ocr_result = requests.post(
    f"{BASE_URL}/pdfOcr",
    headers=HEADERS,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 157)May include surrounding context.

md
).json()

# Step 2: Parse the OCR'd PDF for tables
parsed = requests.post(
    f"{BASE_URL}/pdf/parse",
    headers=HEADERS,
    json={

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The webpage capture workflow sends a remote URL to an external rendering service but does not warn that page contents, session-dependent views, or internal dashboard data may be exposed to that service during rendering. This is especially risky because the example targets a dashboard, which often contains private operational or customer information.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 180)May include surrounding context.

md
import concurrent.futures

def capture_image():
    return requests.post(
        f"{BASE_URL}/generateImage",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 224)May include surrounding context.

python
# Step 1: Split into smaller parts
split_result = requests.post(
    f"{BASE_URL}/pdf/split",
    headers=HEADERS,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 237)May include surrounding context.

md
# Step 2: Compress each part
compressed_parts = []
for part_url in split_result.get("urls", []):
    comp = requests.post(
        f"{BASE_URL}/compressPdf",
        headers=HEADERS,
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 265)May include surrounding context.

md
"https://example.com/photos/img004.jpg",
]

result = requests.post(
    f"{BASE_URL}/imageToPdf",
    headers=HEADERS,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 292)May include surrounding context.

md
def call_api(endpoint, payload, max_retries=3):
    for attempt in range(max_retries):
        resp = requests.post(
            f"{BASE_URL}/{endpoint}",
            headers=HEADERS,
            json=payload,

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · advanced.md (reported line 339)May include surrounding context.

python
# Step 1: Create a template (one-time)
requests.post(
    f"{BASE_URL}/createTemplate",
    headers=HEADERS,
    json={

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The reference states that all requests are sent to an external service with an API key, but it does not warn that provided document contents, raw HTML, URLs, passwords, OCR inputs, and extracted data may be transmitted to and processed by that third party. In this skill context, users may reasonably assume local tooling for document manipulation, so the omission increases the chance of accidental disclosure of sensitive files, secrets, or internal URLs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documented /urlToHtml endpoint materially expands the skill from PDF/document processing into general-purpose web scraping using a headless browser, but that capability is not reflected in the skill description/manifest. Hidden or under-disclosed scraping capability can mislead users and downstream agents into sending arbitrary URLs for content extraction, increasing privacy, compliance, and abuse risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The delete endpoints for files and templates are destructive operations, yet the documentation gives no warning that deletion may be irreversible or may affect later workflows that depend on those assets. In an agent setting, this raises the risk of accidental data loss from ambiguous user prompts or automation mistakes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples repeatedly instruct users to send full document contents, document URLs, and extracted data to a third-party service, but they do not disclose the privacy, confidentiality, retention, or compliance implications of that transmission. In a document-processing skill, this can cause users to unintentionally upload sensitive contracts, invoices, IDs, medical records, or internal files to an external processor without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The cURL example sends raw HTML content to an external API and models that behavior as a basic default workflow. In this skill context, the transmission itself is the product behavior, but the security issue is the absence of notice and safeguards around uploading potentially sensitive content to a third party.

Content

Scanner excerpt · examples.md (reported line 10)May include surrounding context.

HTML to PDF

cURL

bash
curl -X POST https://pdfapihub.com/api/v1/generatePdf \

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This code sends HTML content and associated rendering data to an external API endpoint using an API key. While external transmission is expected for this integration, it is still a real security concern in context because the example normalizes uploading potentially sensitive document content without any guardrails or warnings.

Content

Scanner excerpt · examples.md (reported line 34)May include surrounding context.

md
API_KEY = "your-api-key"
BASE_URL = "https://pdfapihub.com/api/v1"

response = requests.post(
    f"{BASE_URL}/generatePdf",
    headers={
        "CLIENT-API-KEY": API_KEY,