Back to skill

Security audit

PDF文件高保真转换器

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does the PDF work it advertises, but its default PDF-to-PPT flow can automatically send document text to external or configurable translation services without clear privacy disclosure or explicit opt-in.

Install only if you are comfortable with PDF text being sent to translation providers or a configured OpenAI-compatible endpoint during PDF-to-PPT conversion. Use --no-translate/no_translate for confidential documents, review output copies before replacing originals, and use detect-only before watermark removal when document integrity matters.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (33)

Tainted flow: 'api_base' from os.environ.get (line 201, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Content
f"Return ONLY the translated text, no explanation.\n\n"
            f"Text: {text}"
        )
        resp = requests.post(
            f"{api_base}/chat/completions",
            headers={"Authorization": f"Bearer {api_key}"},
            json={
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The declared description presents a broad PDF conversion/processing skill with many triggers and capabilities, but this code chunk is narrowly focused on PDF form filling. It supports two workflows: fillable-form detection/filling via pypdf, and non-fillable-form assistance via page-to-image rendering plus coordinate-based text insertion via PyMuPDF. It does not perform document conversion to PPT/Word/Excel, watermark removal, table extraction, or translation. While 'PDF表单填写/填写PDF表格' is accurately represented, the overall declared purpose substantially overstates the implemented functionality, making the description materially inaccurate for this supplied code chunk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description presents a broad multi-function PDF processing skill, but the code chunk only performs one narrow function: watermark detection/removal in PDFs. That function is declared ('PDF去水印/移除水印'), so the code is not maliciously off-scope, but the declared description materially overstates the implemented behavior in this chunk. No evidence in the code supports format conversion, editable document conversion, form filling, table extraction, or translation. Therefore the description does not accurately represent what this supplied code chunk actually does.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description presents a broad multi-function PDF processing skill, but the code chunk is narrowly focused on one function: converting a PDF into editable PowerPoint files. The translation-related logic is only a subfeature of that PPTX conversion pipeline, producing an additional Chinese PPTX when the source PDF is detected as foreign-language. There is no code for Word/Excel/image conversion, watermark removal, form filling, or exporting extracted tables to Excel. No suspicious unrelated resource access or permissions are evident, but the declared description materially overstates the implemented capabilities in this code chunk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description presents a multi-purpose PDF processing skill with many triggers and capabilities: PDF-to-PPT/Word/Excel/image conversion, watermark removal, form filling, batch table extraction, and translation. The supplied code implements only one narrow function: extracting tabular data from PDFs into Excel sheets, including batch extraction across multiple PDFs. That means one declared capability—batch PDF table extraction to Excel—is represented, but the rest of the advertised behaviors are absent. This is a material description-behavior mismatch because the primary purpose in code is limited table extraction, not a general PDF conversion/processing suite. There is no evidence of OCR, translation, watermark removal, form filling, or non-table document conversion.

Missing User Warnings

High
Confidence
97% confidence
Finding
The README states that foreign PDFs are automatically translated and lists `translators` and `requests` as dependencies, which implies possible transmission of PDF text to third-party services. Because this affects user data and privacy, the markdown should clearly disclose the external translation behavior and any data-sharing implications.

Ae1

High
Category
analysis-evasion
Content
> 📖 各格式详细参数、技术细节、降级策略、已知限制见 [references/usage-guide.md](references/usage-guide.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
> 📖 各格式详细参数、技术细节、降级策略、已知限制见 [references/usage-guide.md](references/usage-guide.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
The fallback translation path reads API endpoint and key configuration from environment variables and transmits the text to `/chat/completions` over HTTP. For a PDF converter/processor, remote LLM submission of document contents is a materially different capability with privacy implications, and the manifest does not state that translation relies on external or configurable network services.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description says the skill should trigger even when the user does not say 'convert', and includes broad examples like '这个报告能不能编辑' and '去掉这个水印'. These phrases are common requests that may appear in broader document-help contexts, making activation boundaries ambiguous despite the short list of exclusions.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This markdown file applies to SQP-2, and it instructs users to run `qpdf --decrypt` on encrypted PDFs. Decrypting creates a less protected output file that may expose sensitive document contents, but the guide provides no warning about handling, storage, or cleanup of the decrypted copy.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code defines all user-facing tool descriptions and parameter descriptions in Chinese, which imposes a specific language on users of the skill. The file does not provide any opt-in, localization alternative, or justification that the skill is intended only for a Chinese-speaking or region-specific environment.

Context-Inappropriate Capability

Medium
Confidence
76% confidence
Finding
The manifest mentions foreign-PDF translation as a trigger, but this MCP server file only declares concrete tools for conversion, form filling, table extraction, image rendering, and watermark removal. Exposing a `no_translate` toggle for `pdf_to_pptx` implies embedded language-translation behavior inside a conversion tool without a corresponding first-class tool or clear implementation detail in this file, making the capability unjustified relative to the stated PDF-processing purpose here.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
}

    try:
        result = subprocess.run(
            cmd,
            capture_output=True,
            text=True,
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The module description, CLI help text, and runtime output are written in Chinese, which imposes a specific language on users. There is no opt-in, fallback, or explanation that the tool is intended only for a Chinese-speaking or region-specific audience.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This code applies redactions to remove detected text and saves a modified PDF, and elsewhere the script deletes XObject references and writes a cleaned output file. Although the tool's purpose is watermark removal, the user-facing help and runtime messages do not clearly warn that aggressive detection or redaction may permanently remove legitimate content and alter the document.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The function enables automatic translation by default and imports translation helpers, then later batches extracted text for translation. Because this involves sending document text derived from the user's PDF to a translation service, the script should clearly disclose that content may leave the local system before doing so.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The natural-language description states that foreign-language PDFs will automatically generate a Chinese version by default. This imposes a specific locale/language behavior without first obtaining user choice, which conflicts with the language/locale policy criteria.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The manifest names this file's skill as a PDF converter/processor, and while the overall skill description mentions foreign-PDF translation, this specific script is documented as converting PDF to editable PowerPoint. The code imports translation utilities, detects document language, and batch-translates extracted text blocks, which is a separate capability beyond straightforward format conversion and likely involves external translation services.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The file's docstring, CLI description, help text, and runtime messages are written in Chinese, which imposes a fixed language on users. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The manifest frames this skill as a PDF format conversion and processing tool, with translation as a document-processing feature, but this module probes and uses third-party translation engines via the `translators` library. Sending extracted PDF text to remote services is not an obvious local implementation detail for PDF conversion/processing and is not declared in the manifest text provided.

Ssd 3

Medium
Confidence
78% confidence
Finding
The module sends arbitrary input text to third-party translator engines and, on fallback, to an OpenAI-compatible chat model with a natural-language instruction to translate the full text. Although framed as translation, the effect is to disclose all user-provided content to another service, and the code even preserves items like email addresses and URLs rather than redacting them. This is a semantic data-leak risk because the intent is conveyed as normal processing rather than explicit exfiltration language.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This code transmits the text content to a translators backend, which may be a remote third-party service, but there is no non-verbose disclosure, confirmation prompt, or explicit safety warning in the code. Because the operation can expose user-provided document contents over the network, it should be clearly disclosed.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The prompt explicitly instructs the model to translate to Simplified Chinese, imposing a specific locale choice in natural-language instructions. The file does not indicate user opt-in or a documented justification for forcing this language variant.

Static analysis

No suspicious patterns detected.