Back to skill

Security audit

Yahoo Finance CLI

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Yahoo Finance data helper, with the main caution being its reliance on a globally installed, unpinned community npm package.

Before installing, consider pinning and reviewing a specific yahoo-finance2 version, preferably in a controlled local environment rather than globally. Use the skill for live Yahoo Finance lookups, and treat returned financial data as potentially delayed or incomplete rather than as financial advice.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:11
Finding
Unpinned Global Third-Party Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 11–15 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ## Installation Status The package is globally installed as `yahoo-finance`. (Installed via `npm install -g yahoo-finance2`) ``` ### Technical Analysis The skill relies on the community-supported `yahoo-finance2` npm package but documents its installation without an exact version or integrity verification. Consequently, `npm install -g yahoo-finance2` resolves whichever package version is current when installation occurs rather than a previously reviewed release. The global installation mode also gives the installed package broader reach than a project-local dependency. npm packages may execute lifecycle scripts during installation unless those scripts are explicitly disabled. Therefore, a compromised maintainer account, malicious package release, or unexpectedly modified future release could introduce code that executes with the privileges of the user performing the installation. The repository only documents the installation and does not itself contain an installer or execute the command. Exploitation therefore depends on an operator or provisioning system installing the dependency as documented. ### Attack Path 1. An attacker compromises the upstream npm package, its maintainer account, or its release process. 2. The attacker publishes a malicious or backdoored version under the legitimate `yahoo-finance2` package name. 3. An operator provisions the skill using the documented unpinned command: ```bash npm install -g yahoo-finance2 ``` 4. npm resolves and installs the attacker-controlled release. 5. Malicious lifecycle code may execute during installation, or malicious runtime code may execute when the agent invokes `yahoo-finance`. 6. The compromised dependency can manipulate financial results or access resources available to the installing or invok ...[truncated 737 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an explicitly reviewed version: ```bash npm install -g yahoo-finance2@<reviewed-exact-version> ``` 2. Prefer a project-local installation over a global installation and invoke the pinned binary from that controlled environment. 3. Commit and enforce a lockfile where the deployment model permits it, using deterministic installation such as `npm ci`. 4. Verify package provenance and integrity before deployment, including the publisher, package metadata, release history, and registry integrity hash. 5. Review dependency changes before upgrading and use automated supply-chain scanning for the package and its transitive dependencies. 6. Disable npm lifecycle scripts during installation where compatible: ```bash npm install --ignore-scripts yahoo-finance2@<reviewed-exact-version> ``` 7. Run the CLI under a dedicated, least-privileged account or sandbox with restricted filesystem and network access. 8. Document a tested version and controlled upgrade process in `SKILL.md` rather than directing users to install the latest available release. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger description is extremely broad, covering nearly any request related to prices, quotes, recommendations, holdings, market movers, and portfolio valuation across all languages. This can cause the skill to activate for loosely related finance prompts where live Yahoo data is unnecessary, increasing the chance of tool overuse, misrouting, or inappropriate delegation rather than direct code execution or data compromise.

Static analysis

No suspicious patterns detected.