T08 · Insecure Dependencies
- Location
scripts/prepare_doc_workflow.sh:26- Finding
Runtime Execution of an Unpinned Third-Party Dependency
- Content
View full analysis
Vulnerability Details
File Location:
scripts/prepare_doc_workflow.sh, lines 26-28
Vulnerability Type: Unpinned runtime dependency retrieval and execution
Risk Level: HighVulnerable Code
bash if command -v uvx >/dev/null 2>&1; then echo "Running: uvx --from 'markitdown[all]' markitdown '$INPUT' -o '$OUTPUT'" uvx --from 'markitdown[all]' markitdown "$INPUT" -o "$OUTPUT"Technical Analysis
The script uses
uvx --from 'markitdown[all]'to resolve and execute a third-party Python package at runtime. Neither the package version nor the integrity of its transitive dependencies is pinned or verified.Consequently, the code executed by this reviewed skill is not fully determined by the contents of the skill package. It may change when a new package release is published or when the configured Python package index, package, or transitive dependency is compromised. The
[all]extra can also expand the dependency set and therefore increase the supply-chain attack surface.Shell injection through
INPUTorOUTPUTis not demonstrated here because those variables are correctly passed as quoted arguments. The risk instead arises from executing mutable external dependency code.Attack Path
- An attacker compromises the package source, a future
markitdownrelease, or one of the package's transitive dependencies. - The user invokes
prepare_doc_workflow.shfor a supported Office or PDF input and supplies an output path. - The script detects that
uvxis installed. uvxresolves the unpinnedmarkitdown[all]package through its configured package index.- The retrieved package and its dependencies execute with the permissions and environment of the user running the skill.
- Malicious dependency code can access files, environment variables, network resources, and other assets available to that user.
Impact Assessment
Successful exploitation permits arbitrary code exec ...[truncated 528 chars]
- An attacker compromises the package source, a future
- Remediation
View remediation
Remediation Suggestions
- Pin
markitdownto a specifically reviewed version rather than resolving the latest available release:bash uvx --from 'markitdown[all]==REVIEWED_VERSION' markitdown "$INPUT" -o "$OUTPUT" - Lock all transitive dependencies and verify cryptographic hashes. Prefer an audited lockfile or prebuilt, integrity-verified environment.
- Use a trusted package index explicitly and prevent dependency resolution from untrusted or user-controlled indexes.
- Avoid runtime installation where practical. Package reviewed dependencies with the deployment or install them through a controlled setup process.
- Inform the user before any package is downloaded or executed, and require explicit consent for first-time installation.
- Run document conversion in a sandbox with restricted filesystem access, minimal environment variables, and limited or disabled network access.
- Document the runtime network and dependency behavior in
SKILL.mdso that it is visible during review.
- Pin
