Back to skill

Security audit

Media Downloader

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent media-downloader skill, but users should notice that it can save files locally, use optional cookie files, install Python dependencies at runtime, and send audio back over Telegram when used there.

Install only if you are comfortable with the skill downloading media from supplied URLs into your local media folders, possibly using a configured cookies file for authenticated access, and sending audio files back through Telegram when the request comes from Telegram. For lower risk, use a dedicated output folder, avoid placing sensitive cookies at the documented paths, and prefer a version with pinned dependencies and clearer confirmation before Telegram uploads.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
dl.py:1
Finding

Runtime Resolution of Unpinned Third-Party Dependencies

Content
View full analysis
=3.12" # dependencies = [ # "loguru>=0.7.3", # "python-slugify>=8.0.4", # "yt-dlp", # ] # /// ``` ### Technical Analysis The Skill is executed using `uv run --script`, which can resolve and install the dependencies declared in the inline script metadata at invocation time. The `yt-dlp` dependency has no version constraint, while `loguru` and `python-slugify` have only minimum versions and no upper bounds. The project contains no dependency lockfile or package hashes. As a result, executing the same reviewed Skill at different times can load materially different third-party code without any corresponding modification to the project. Imported package code executes within the Python process under the permissions of the user running the Skill. This is not evidence that the current named packages are malicious. The vulnerability is the absence of reproducible dependency controls, which exposes the Skill to compromised releases, maintainer-account compromise, malicious transitive dependencies, or unexpected incompatible updates. ### Attack Path 1. An attacker compromises a declared dependency, one of its transitive dependencies, or the relevant package-publishing account. 2. The attacker publishes a malicious release that satisfies the Skill's unconstrained or open-ended version requirements. 3. A user invokes the Skill through `uv run --script dl.py`. 4. `uv` resolves the malicious release because no exact lock or integrity hash prevents its selection. 5. The malicious package is loaded by the Python process, including through imports such as `import yt_dlp` or `from loguru import logger`. 6. Attacker-controlled code executes with the filesystem, network, and proce ...[truncated 719 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
dl.py:249
Finding

Downloaded Artifacts Remain in Unmanaged Temporary Directories

Content
View full analysis
None: with yt_dlp.YoutubeDL(options) as ydl: ydl.download([self.url]) return self.move_to_out_dir() ``` ### Technical Analysis The downloader creates a unique temporary directory using `tempfile.mkdtemp()` and directs `yt-dlp` to write downloaded content into it. The directory is never removed through a `finally` block, context manager, or explicit cleanup operation. On a successful run, moving the final files can still leave an empty temporary directory. More importantly, if probing, downloading, post-processing, renaming, or moving fails, partial media files and metadata can remain in the system temporary area indefinitely. `mkdtemp()` provides safer unique directory creation than predictable filenames, so no direct temporary-file race condition was identified. The issue is the unmanaged lifetime of potentially large or sensitive artifacts. ### Attack Path 1. A user or atta ...[truncated 1170 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill includes logic to automatically send downloaded audio files over Telegram when certain context conditions are met, but it does not provide a prominent privacy warning or require explicit user consent at send time. This can expose downloaded content and metadata to a third-party messaging platform unexpectedly, making the behavior materially more sensitive than a local-only download.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the agent to execute a script that uses network access, environment-derived cookie files, and writes files into user media directories, but it declares no explicit tool scope or permission boundaries. This creates a transparency and least-privilege problem: the agent may perform sensitive actions the user has not been clearly warned about, including authenticated downloads via discovered cookies.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The triggers "Download this video ..." and "Download this music ..." are broad natural-language phrases likely to overlap with ordinary conversation, increasing the chance of unintentional invocation. Because the skill performs network downloads and local file writes, accidental triggering can lead to unexpected data transfer and filesystem modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description says it 'smartly download[s] media' but does not clearly warn that files will be written directly into persistent user directories like ~/Music, ~/Movies, or ~/Videos. Users may reasonably interpret this as a transient action, so the omission increases the risk of unexpected disk usage, content persistence, and indexing by local media servers.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill automatically looks for authentication cookies in local dotfiles and environment variables and passes them to yt-dlp. That expands the skill from simple public-media downloading into credential-assisted access, which can expose session tokens to a third-party downloader path and may download private or account-scoped content without clear user consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a downloader for media content, so saving downloaded files is expected. In verbose mode, the code also writes info-<id>.json probe metadata to the current working directory, which is a separate artifact not implied by the stated purpose and may expose media/account metadata locally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script saves extractor metadata to a predictable local JSON file in verbose mode without a clear warning or consent flow. Extracted metadata can include URLs, uploader information, playlist details, and potentially account-scoped data when cookies are used, creating unnecessary local data exposure on shared systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.