Back to skill

Security audit

x-research-kit

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it tells users to let a third-party tool read Chrome browser cookies without enough safeguards.

Review before installing. The public X/Twitter extraction workflows are coherent, but avoid using the documented Chrome cookie command unless you understand that browser cookies can act like login credentials. If authenticated access is needed, use a dedicated browser profile with only the necessary X session, avoid logging or sharing cookie material, and prefer pinned or trusted installations of yt-dlp and gallery-dl.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding
Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 15–27 **Vulnerability Type**: Unpinned and unverified third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```markdown **Prerequisites:** yt-dlp >= 2024.01.01, gallery-dl >= 1.26.0 (optional, for image posts) ## Prerequisites ```bash # macOS brew install yt-dlp gallery-dl # pip pip install yt-dlp gallery-dl # Verify yt-dlp --version && gallery-dl --version ``` ``` ### Technical Analysis The installation commands retrieve the latest available releases of `yt-dlp`, `gallery-dl`, and their transitive dependencies from the package repositories configured on the user's system. Although the documentation states minimum versions, it does not enforce exact reviewed versions, use a lockfile, verify package hashes or signatures, or identify trusted package sources. Checking `--version` only confirms that executables are available; it does not verify their integrity or provenance. Package installation can execute package-controlled installation logic. Consequently, a compromised package repository, malicious mirror, dependency compromise, or unsafe local package-manager configuration could introduce code that was not present when this Skill was reviewed. ### Attack Path 1. An attacker compromises a relevant package, transitive dependency, package index, mirror, or package-manager configuration. 2. A user follows the Skill documentation and runs `brew install yt-dlp gallery-dl` or `pip install yt-dlp gallery-dl`. 3. The package manager retrieves an attacker-controlled or compromised release because no exact versions or hashes are enforced. 4. Package installation logic or the installed executable runs with the privileges of the invoking user. 5. The malicious component accesses data available to that user, performs unauthorized network activity, or alters local files. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of ...[truncated 338 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin dependencies to exact versions that have been reviewed, rather than specifying only minimum versions. 2. Provide a lockfile or requirements file containing cryptographic hashes, such as a hash-locked Python requirements file. 3. Instruct users to install dependencies inside a dedicated virtual environment or isolated container. 4. Identify the expected official repositories and warn against untrusted mirrors or similarly named packages. 5. Verify package signatures or hashes before installation where the package manager supports it. 6. Add a documented dependency update process that includes security review and controlled lockfile regeneration. 7. Avoid elevated installation privileges unless strictly required. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:132
Finding
Broad Browser Cookie Store Access for X Authentication<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 132–135 **Vulnerability Type**: Browser credential-store access without least-privilege safeguards **Risk Level**: Medium ### Vulnerable Code ```markdown ## Notes - X may require cookies for some content. Export browser cookies with: `yt-dlp --cookies-from-browser chrome "URL"` ``` ### Technical Analysis The documented command directs a third-party executable to read cookies from the user's Chrome profile. Browser cookies are authentication material and may include active session credentials. The guidance does not require explicit informed consent, identify a dedicated browser profile, limit access to an X-only profile, or provide secure handling and deletion procedures. Although legitimate `yt-dlp` behavior uses applicable cookies for the requested site, granting the executable access to the browser cookie database expands its access beyond unauthenticated metadata retrieval. This becomes particularly significant in combination with the unpinned dependency installation instructions: a compromised, replaced, or spoofed `yt-dlp` executable could inspect or exfiltrate sensitive browser session material. ### Attack Path 1. The user has active authenticated sessions stored in a Chrome profile. 2. The user follows the documentation and invokes `yt-dlp --cookies-from-browser chrome "URL"`. 3. The `yt-dlp` process receives access to Chrome's cookie storage and any operating-system credential facilities required to decrypt supported cookies. 4. A compromised or malicious `yt-dlp` executable reads session material beyond what is necessary for the requested X resource. 5. The executable transmits or locally stores the captured credentials. 6. The attacker reuses still-valid session tokens to access affected accounts within the permissions of those sessions. ### Impact Assessment The immediate scope is the browser cookie data accessible to the invoked process. If exploited through a compr ...[truncated 332 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit user consent before accessing any browser cookie store. 2. Recommend a dedicated browser profile containing only the minimum X session required for the task. 3. Specify the intended browser profile explicitly instead of implicitly using a general-purpose profile. 4. Prefer a narrowly scoped cookie export when possible, store it with restrictive file permissions, and delete it immediately after use. 5. Warn users that cookies are sensitive authentication credentials and must not be shared, logged, committed, or included in generated reports. 6. Pin and verify the integrity of `yt-dlp` before granting it access to browser credentials. 7. Run the tool in an isolated environment with restricted filesystem and network access where practical. 8. Document session revocation procedures in case cookie exposure is suspected. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Context Leakage

High
Category
Data Exfiltration
Content
1. Identify URL type (tweet, profile, space)
2. Run the appropriate yt-dlp command
3. Parse JSON and present formatted Markdown
4. Offer follow-ups: "Want me to analyze the engagement?" / "Extract the full thread?"

When user asks to **download** media:
Confidence
75% confidence
Finding
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Content
pip / apt)
- **Protected account:** "This account is protected. Cannot extract without authentication."
- **Tweet deleted:** "This tweet has been deleted or is unavailable."
- **Rate limited:** "X rate limit reached. Wait a few minutes and retry."
- **Image-only tweet:** Suggest gallery-dl as alternative

## Notes

- X may require cookies for some content. Export browser cookies with:
  `yt-dlp --cookies-from-browser chrome "URL"`
- Rate limits apply. Space requests between extractions if doing bulk analysis.

## About

X Research Kit is an open-source project by [SnapVee](https://snapvee.com).
Confidence
98% confidence
Finding
`--cookies-from-browser chrome` is a high-risk pattern because it instructs the tool to pull authenticated browser cookies directly from a local browser profile. While this is a legitimate yt-dlp feature, embedding it in a skill materially increases the chance that an agent or user will expose reusable session credentials, especially if command output, errors, or surrounding workflow are logged or shared.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill advises using browser cookies to access X content without warning that this imports authenticated session material from the user's browser. In an agentic context, encouraging `--cookies-from-browser` can expose session tokens tied to the user's account and broaden access to protected content, creating a real risk of credential/session misuse.

Missing User Warnings

Low
Confidence
88% confidence
Finding
As a markdown file, this skill should disclose behaviors that may affect privacy. It emphasizes extracting structured data from posts, profiles, and spaces, but does not include any user-facing warning about handling public-profile data, engagement data, or other potentially sensitive content.

Vague Triggers

Low
Confidence
84% confidence
Finding
This manifest text describes the skill as able to extract data from "any X/Twitter post" and presents a broad toolkit capability, but it does not define any specific activation phrases, invocation boundaries, or exclusion conditions. In a manifest file, such broad natural-language descriptions can create ambiguity about when the skill should be selected or invoked.

Static analysis

No suspicious patterns detected.