T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned Third-Party Dependencies Permit Mutable Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 19, 164, and 283–299
Vulnerability Type: Supply-chain exposure through unpinned Python and CDN dependencies
Risk Level: MediumVulnerable Code
bash python3 -m pip install pymupdf --usermarkdown | **pymupdf** (`import fitz`) | Image extraction (Step 2) | `python3 -m pip install pymupdf --user` | The only package requiring manual installation, version ≥ 1.18 |html <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" async></script> <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>Technical Analysis
The skill directs users to install PyMuPDF without an exact version or a verified package hash. It also loads Mermaid without a version constraint and MathJax using only a major-version constraint. The external scripts have no Subresource Integrity attributes.
These mutable dependency references allow code obtained during a later invocation to differ from the code that was originally reviewed. If a package release, package-distribution account, CDN, or upstream mutable asset is compromised, the substituted code could execute when the user installs the Python dependency or opens a generated HTML note.
This is a supply-chain weakness rather than evidence that the currently referenced packages are malicious.
Attack Path
- An attacker compromises a relevant package release, distribution account, CDN asset, or mutable dependency path.
- The user follows the skill's installation instruction or generates and opens an HTML paper note.
- Package resolution or the browser retrieves the attacker-controlled dependency version.
- The Python package executes with the invoking user's privileges during installation or use, or the CDN script executes in the generated note's browser origin.
- The malicious dependency can access resources available to that user or browser ...[truncated 667 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin PyMuPDF to a reviewed exact version instead of accepting the latest available release.
- Use a requirements or lock file with cryptographic hashes, and install with hash verification.
- Pin MathJax and Mermaid to exact, reviewed artifact versions.
- Add Subresource Integrity hashes and
crossorigin="anonymous"to external script tags. - Prefer bundling reviewed copies of browser dependencies locally so generated notes do not execute mutable remote code.
- Establish a dependency-update process that re-audits and deliberately updates versions and hashes.
