Back to skill

Security audit

Vector Text Fixer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local PDF/SVG text analyzer, but it materially overclaims repaired file output and has ambiguous unpinned dependencies, so it belongs in Review before installation.

Review before installing. Do not rely on this to produce fixed PDF or SVG files as documented; expect analysis results and JSON export only. Install dependencies in an isolated environment, and prefer a corrected, pinned manifest using the intended packages such as PyMuPDF and beautifulsoup4 before running it on important or sensitive documents.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Incorrect and Unpinned Runtime Dependencies## Vulnerability Details **File Location**: `requirements.txt:1-3` **Vulnerability Type**: Supply-chain risk from ambiguous, incorrect, and unpinned dependencies **Risk Level**: Medium ### Vulnerable Code ```text bs4 dataclasses fitz ``` ### Technical Analysis The dependency manifest does not reliably identify the distributions expected by the source code and documentation: - The code imports `fitz` as the PyMuPDF API, but the manifest requests the distribution named `fitz` rather than `PyMuPDF`. - The documentation identifies `beautifulsoup4` as a dependency, while the manifest uses the indirect `bs4` package name. - `dataclasses` is normally part of the Python standard library on supported modern Python versions and should not be installed unless legacy Python compatibility explicitly requires the backport. - None of the dependencies have reviewed version constraints, hashes, or a lock file. Python packages can execute installation-time code with the privileges of the account running `pip`. Ambiguous package identities and unrestricted version resolution therefore expose users to package substitution, incompatible releases, compromised future releases, and non-reproducible environments. ### Attack Path 1. A user follows the documented setup procedure and runs `pip install -r requirements.txt`. 2. The package index resolves the literal, ambiguous package names and selects unrestricted versions. 3. The selected distributions and their transitive dependencies are downloaded. 4. Any installation hooks or build backends supplied by those distributions execute under the user's account. 5. If an unintended or compromised distribution is resolved, it can run arbitrary code during installation, before the Skill itself is invoked. Exploitation depends on dependency resolution selecting an unintended or compromised package; no malicious package payload is embedded in this repository. ### Impact Assessment Succe ...[truncated 422 chars]
Remediation
## Remediation Suggestions 1. Replace ambiguous package names with the distributions actually required by the source: - Use `PyMuPDF` for the `fitz` import. - Use `beautifulsoup4` directly instead of the `bs4` shim. 2. Remove `dataclasses` unless the project intentionally supports a Python version that requires the backport. 3. Pin every direct and transitive dependency to a reviewed version through a lock file. 4. Generate and verify cryptographic hashes, such as by using `pip --require-hashes`. 5. Define and enforce a supported Python version so unnecessary compatibility packages cannot enter the environment. 6. Audit locked dependencies for known vulnerabilities and review changes before updating them. 7. Install dependencies in an isolated, least-privileged virtual environment or container rather than under an administrative account. A corrected direct-dependency manifest should begin with reviewed versions of the intended distributions, for example: ```text beautifulsoup4==<reviewed-version> PyMuPDF==<reviewed-version> ```
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The core description implies an actual fixer that detects and then replaces/repairs garbled text in vector graphic files for final editing, preserving the original layout. In practice, the code mainly performs analysis and reporting: it extracts text from PDFs/SVGs, flags suspicious text, generates suggested fixes, and optionally exports editable JSON for manual correction. Although it accepts an output path, it never saves modified PDF or SVG content back to that path. For PDF it uses PyMuPDF only to open and read text spans; for SVG it parses XML and reads text tags, but again does not rewrite files. Therefore the primary behavior is detection plus suggestion/export, not true in-file repair. The batch and JSON export features are additional capabilities, but the main mismatch is that the advertised repair/replacement functionality is not actually implemented.

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python scripts/main.py --input document.pdf --output fixed.pdf
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill describes file read/write behavior but does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, missing scope declarations can cause overbroad file access assumptions or bypass policy enforcement, increasing the chance that the skill reads from or writes to unintended paths.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This code file contains user-facing natural-language strings in Chinese in the module description and throughout the CLI help/output, but it does not offer any language selection or indicate that the tool is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest describes an actual fixer that replaces and repairs garbled text in PDF/SVG files, preserving formatting and layout. In both PDF and SVG fix methods, the code only extracts text, flags garbled content, and produces suggested fixes in a result object; it never applies replacements to the document nor writes a repaired PDF/SVG to the provided output path.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The docstrings and command description repeatedly say the tool 'repairs' PDF/SVG garbled text, which implies direct file modification or generation of corrected vector files. The implementation only inspects text, computes suggestions, and optionally exports JSON; no repaired PDF/SVG is written despite output_path being accepted and reported.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The argparse description, help text, and runtime status/error messages are all presented in Chinese, and the tool does not provide a way for users to choose another language. Because these strings govern normal operation, they effectively enforce a single language rather than offering localization or explicit locale scoping.

Missing User Warnings

Low
Confidence
80% confidence
Finding
This markdown file documents batch processing and repaired-file output, which can affect multiple user files and folders. While the capability is described, it does not explicitly warn users that running the batch mode will write repaired copies and related outputs to the specified output location.

Unpinned Dependencies

Low
Category
Supply Chain
Content
bs4
dataclasses
fitz
Confidence
93% confidence
Finding
The dependency `bs4` is unpinned, so installs may resolve to different versions over time, including versions with newly introduced bugs or known vulnerabilities. This creates a supply-chain and reproducibility risk, especially in automated environments where builds may occur at different times.

Unpinned Dependencies

Low
Category
Supply Chain
Content
bs4
dataclasses
fitz
Confidence
90% confidence
Finding
`dataclasses` is also unpinned, which reduces build reproducibility and can allow unintended package changes to enter the environment. In addition, `dataclasses` is part of the Python standard library in Python 3.7+, so listing it as an external dependency may cause unnecessary or confusing package resolution behavior depending on the runtime.

Unpinned Dependencies

Low
Category
Supply Chain
Content
bs4
dataclasses
fitz
Confidence
95% confidence
Finding
The `fitz` dependency is unpinned, which exposes the project to non-reproducible installs and potential supply-chain risk if upstream releases change unexpectedly. This is somewhat more concerning in this skill because PDF/vector-processing libraries often parse complex untrusted file formats, so an unsafe or compromised update could increase attack surface significantly.

Static analysis

No suspicious patterns detected.