Back to skill

Security audit

React

Security checks for vulnerabilities and agentic risk

Overview

This React skill is a conventional coding-guidance package with disclosed local preference memory and no evidence of hidden, destructive, or data-exfiltrating behavior.

Safe to install as a React guidance skill. Before running the optional setup commands, consider pinning package versions and running scaffolding in a normal least-privileged project environment; do not put secrets in the skill memory file.

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
setup.md:72
Finding

Unpinned Third-Party Packages Executed During Setup

Content
View full analysis

Vulnerability Details

File Location: setup.md, lines 72–80
Vulnerability Type: Insecure third-party dependency execution
Risk Level: Medium

Vulnerable Code:

bash
# Next.js
npx create-next-app@latest my-app --typescript --tailwind --app

# Vite (SPA)
npm create vite@latest my-app -- --template react-ts

# Add shadcn/ui
npx shadcn@latest init

# Data + state + forms
npm install @tanstack/react-query zustand react-hook-form zod @hookform/resolvers

Technical Analysis

The setup instructions execute mutable latest releases through npx and npm create, then install additional dependencies without pinned versions. The project does not include a lockfile, checksum list, integrity policy, or reviewed version manifest that would make these commands reproducible.

Package initializers and dependency lifecycle scripts can execute code with the permissions of the user running the package manager. Consequently, the effective code executed by these instructions can change after this skill has been audited. This is a supply-chain exposure rather than evidence that any currently referenced package is malicious.

Attack Path

  1. An attacker compromises a referenced package, its registry publisher account, or a transitive dependency.
  2. The attacker publishes a malicious release that becomes the package's latest version or otherwise enters dependency resolution.
  3. A user follows the documented setup commands.
  4. npx, npm create, or npm install retrieves the compromised package or dependency.
  5. Malicious initializer or lifecycle code executes locally with the invoking user's permissions.

Impact Assessment

Successful exploitation could provide arbitrary code execution under the account running the setup commands. This may permit access to that user's source code, environment variables, package-manager credentials, SSH material, and other readable files. It may also allow mod ...[truncated 316 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace mutable @latest references with explicitly reviewed package versions.
  • Pin direct dependency versions and commit the generated lockfile.
  • Use npm ci for subsequent reproducible installations.
  • Review initializer packages and their provenance before execution.
  • Enable registry provenance and integrity verification where supported.
  • Run initializers in an isolated, least-privileged environment when practical.
  • Audit transitive dependencies and package lifecycle scripts before adopting updated versions.
  • Establish a controlled dependency-update process so version changes receive review rather than being selected automatically at execution time.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (6)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · memory-template.md (reported line 14)May include surrounding context.

md
- **Type:** SPA / SSR / Static / Hybrid
- **Framework + version:** Next.js / Vite / Remix
- **React version:** (19+ → React Compiler status matters, see below)
- **React Compiler:** on / off  <!-- decides Core Rule 6: hand memoization or none -->

## Stack Decisions

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest scopes the skill away from Next.js-specific concerns, directing users to a separate nextjs skill for routing and deployment. This setup file nonetheless presents a Next.js App Router directory layout as the canonical project structure, which is a semantic mismatch with the declared scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a React skill and explicitly excludes Next.js routing and deployment. Recommending Next.js 15 as the primary framework in setup documentation broadens the apparent scope beyond what the skill claims to cover.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest says the skill should not be used for Next.js routing and deployment, yet the setup file directly instructs creating a Next.js application. That behavior is more specific than the declared purpose and can steer users into a framework-specific workflow outside the skill's promised boundaries.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.