Back to skill

Security audit

YouTube Transcript (yt-dlp)

Security checks for vulnerabilities and agentic risk

Overview

This skill is a YouTube transcript extractor whose active behavior is mostly purpose-aligned, but users should understand that optional cookies and cached transcript text are sensitive.

Install only if you are comfortable with a local tool sending YouTube video identifiers to YouTube, optionally using your explicitly supplied YouTube cookies, and storing transcript text in a local SQLite cache. Avoid using browser/session cookies unless the video requires them, and clear the cache for private or sensitive transcripts.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is a significant description-behavior mismatch: the skill claims to be a yt-dlp-based captions extractor, but the detected behavior includes direct network/API access, cookie processing for authenticated requests, local SQLite writes, and undeclared third-party transcript services. That mismatch is dangerous because users may provide sensitive cookies or trust the skill under false assumptions, while transcript contents or authentication material could be sent to additional endpoints or stored locally without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares no explicit tool scope even though its described operation clearly requires shell execution, network access, environment variable use, and local file interaction. In an agent environment, missing permission boundaries can cause the skill to run with broader capabilities than users or reviewers expect, increasing the risk of unintended file access, network use, or secret handling.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/yt_transcript.py (reported line 62)May include surrounding context.

python
def _run(cmd: list[str], timeout_s: int = 60) -> str:
    try:
        p = subprocess.run(
            cmd,
            check=False,
            stdout=subprocess.PIPE,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Multiple network paths hard-code English locale preferences, including Accept-Language: en-US,en;q=0.9 and fallback transcript language values of "en" or "en-US". This imposes a specific language/locale choice even when the user did not request English, which conflicts with the policy against forcing a locale without opt-in.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/yt_transcript.py (reported line 631)May include surrounding context.

python
"""Third-party fallback using Noteey subtitles API.

    Endpoint:
      GET https://api.noteey.com/api/v1/youtube/subtitles?url=<youtube-url>&language=<lang>

    Returns (lang, source, segments).
    """

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/yt_transcript.py (reported line 638)May include surrounding context.

python
"""Third-party fallback using Noteey subtitles API.

    Endpoint:
      GET https://api.noteey.com/api/v1/youtube/subtitles?url=<youtube-url>&language=<lang>

    Returns (lang, source, segments).
    """

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

If a user supplies a YouTube cookies.txt file, the script forwards those cookies in direct HTTP requests to YouTube and may derive SAPISIDHASH-based authenticated headers. That can expose session-linked identifiers and cause authenticated actions against YouTube endpoints without a prominent runtime warning or consent checkpoint, which is risky in an agent skill context where users may not realize their browser cookies are being replayed programmatically.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The exception-handling comments at L1033-L1050 state that there are 'No third-party fallbacks in the public/publishable version' and 'No third-party fallbacks in this build.' However, the same file defines active third-party fallback functions for yt-to-text, DownSub, and Noteey at L0435-L0670. Even if they are not currently invoked from main, the inline documentation actively misstates the file's implemented capabilities and intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states that transcripts are cached in a local SQLite database but does not clearly warn that transcript text persists on disk. This can expose sensitive viewed content, research material, or user-supplied private video transcripts to other local users, backups, or forensic recovery, especially on shared systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The youtubei transcript fallback always requests the watch page with hl=en, forcing English localization regardless of user preference. This is a natural-language policy issue because it sets a locale unconditionally rather than offering a language choice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.