Back to skill

Security audit

NextJS Frontend Development + Integration

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real UI-development skill, but it includes overbroad host, browser, dependency, and process-management instructions that users should review before installing.

Use this only in a disposable or well-isolated workspace. Decline nginx/sudo setup unless you intentionally want external preview exposure, review every npm/npx command, validate project names before shell use, avoid screenshots of private/authenticated pages, and do not run broad PM2 or kill commands on a shared host.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/screenshot.sh:5
Finding

Unrestricted Screenshot Target and Output Path with Chromium Sandbox Disabled

Content
View full analysis
[width] [height]}" OUTPUT="${2:?Output path required}" WIDTH="${3:-1400}" HEIGHT="${4:-900}" # Use a temp HTML that loads the target in an iframe after delay, # or use virtual-time-budget to let JS execute chromium --headless --disable-gpu --no-sandbox --disable-dev-shm-usage \ --window-size="${WIDTH},${HEIGHT}" \ --screenshot="$OUTPUT" \ --hide-scrollbars \ --virtual-time-budget=5000 \ "$URL" 2>/dev/null ``` ### Technical Analysis The script accepts an arbitrary URL and output path without validating either value. Chromium can consequently be directed to network locations beyond the intended local preview server, including loopback services, private-network applications, and potentially cloud instance metadata endpoints. The unrestricted output argument also allows the caller to select any path writable by the current operating-system user. Existing files at those paths may be replaced by screenshot data. Symbolic links and sensitive application paths are not rejected. Chromium is launched with `--no-sandbox`. This removes an important containment boundary and increases the impact of a browser vulnerability or malicious page loaded by the script. Although sandbox disabling is sometimes used in restricted containers, the script does not detect such an environment or limit this behavior to cases where it is necessary. The intended visual-review functionality only requires access to the generated application on a known loopback port and output into a controlled temporary directory. Arbitrary network access, arbitrary output paths, and disabling the browser sandbox exceed those minimum requirements. ### Attack Path 1. An attacker per ...[truncated 1457 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:251
Finding

Mutable and Unpinned Third-Party Package Execution

Content
View full analysis
\ --typescript \ --tailwind \ --app \ --no-src-dir \ --import-alias "@/*" ``` ```bash npm install axios @tanstack/react-query npm install -D @types/node ``` ```bash npx shadcn-ui@latest init ``` ```bash npx shadcn-ui@latest add button card input label select textarea npx shadcn-ui@latest add dropdown-menu dialog sheet tabs npx shadcn-ui@latest add table form avatar badge separator toast ``` ```bash npm install react-hook-form @hookform/resolvers zod ``` ### Technical Analysis The workflow uses `npx ...@latest`, which retrieves and executes whatever release is associated with the mutable `latest` tag at invocation time. The audited Skill therefore does not fully define the code that will execute. Other packages are installed without exact versions in the command examples. No reviewed lockfile or integrity-verification procedure is supplied. Installation can execute package lifecycle scripts with the privileges of the Agent or user running npm. This does not establish that any named package is malicious. The vulnerability is that a future compromised release, package-maintainer account, registry response, or transitive dependency can change the effective executable payload after the Skill has been reviewed. ### Attack Path 1. A package maintainer account, package release, registry, or transitive dependency is compromised. 2. The mutable `latest` tag or an unconstrained dependency resolves to the compromised version. 3. The Skill executes `npx` or `npm install` during project generation. 4. The downloaded CLI code or an installation lifecycle script runs locally. 5. Malicious code inherits the filesystem, network, environment-variable, and process privileges of the invoking account. 6. The payload can modify the gene ...[truncated 867 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:563
Finding

Command Injection Through Unvalidated Project Name Substitution

Content
View full analysis
2>/dev/null || true # Start with PM2 (port 3002 for nginx proxy) PORT=3002 pm2 start npm --name "" --cwd "$(pwd)" -- run dev ``` The same user-derived placeholder is also placed into project-creation commands: ```bash npx create-next-app@latest \ --typescript \ --tailwind \ --app \ --no-src-dir \ --import-alias "@/*" ``` ### Technical Analysis The workflow asks the user for a project name and later interpolates that value into shell commands. In particular, `pm2 delete ` and the project-creation command place the value in an unquoted shell position. If an Agent replaces the placeholder literally with attacker-controlled text, shell metacharacters such as semicolons, command substitutions, redirection operators, or logical operators can alter the command structure. Quoting the value in the `--name` argument alone does not address the other unquoted occurrences. Even quoted shell interpolation requires care because generated command text can be mishandled by the Agent before execution. A strict project-name allowlist and argument-oriented process invocation are therefore necessary. ### Attack Path 1. The Skill asks the requester to provide a project name. 2. An attacker provides a crafted value containing shell syntax, such as a semicolon followed by another command. 3. The Agent substitutes that value into `pm2 delete ` or `npx create-next-app@latest `. 4. The resulting command is passed to a shell. 5. The shell interprets the injected syntax as additional commands. 6. The injected command executes with all privileges and environmental access held by the Agent's operating-system account. ### Impact Assessment Successful exploitati ...[truncated 651 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:1048
Finding

Troubleshooting Commands Can Terminate Unrelated Processes

Content
View full analysis
# Or check port directly lsof -ti:3002 # Kill process on port (if not PM2-managed) kill -9 $(lsof -ti:3002) # Restart with PM2 PORT=3002 pm2 start npm --name "" --cwd "$(pwd)" -- run dev ``` The document also recommends the following broad PM2 operation at `SKILL.md:1112`: ```bash pm2 delete all && pm2 list ``` ### Technical Analysis The troubleshooting workflow identifies processes through a broad command-line pattern, a shared TCP port, or the entire PM2 process registry. It does not verify that the selected process belongs to the generated project, was started by this Skill, or is safe to terminate. `pkill -f "next dev"` can match every Next.js development server owned by the executing user. `kill -9 $(lsof -ti:3002)` forcefully terminates any process bound to port 3002, even if it belongs to a different project. `pm2 delete all` removes every PM2-managed process for the current PM2 account. Using `SIGKILL` also prevents graceful cleanup and can cause data loss or corrupted temporary state. Managing one generated preview server only requires control over the exact process created for that project; global process matching exceeds that requirement. ### Attack Path 1. Another application or user project is running a Next.js process, is registered with the same PM2 account, or legitimately occupies port 3002. 2. The generated project encounters a module error or port conflict. 3. The Agent follows the documented troubleshooting instructions. 4. `pkill`, `kill -9`, or `pm2 delete all` selects processes without verifying ownership by the current project. 5. Unrelated services ...[truncated 1016 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (28)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 81)May include surrounding context.

md
5. **Generate Features** - Build pages and components
6. **Build UI** - Use shadcn/ui components
7. **Visual Review** - Screenshot analysis (optional)
8. **Environment Setup** - .env configuration
9. **Scripts & Documentation** - README and package.json
10. **Export & Deploy** - Zip project and deployment guidance

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as UI scaffolding, but it also instructs browser-driven screenshot capture, local URL rendering, PM2 process management, and nginx-based publishing. This capability expansion matters because users or orchestrators may invoke the skill expecting harmless file generation, while it actually performs host and network operations that broaden attack surface and can expose locally running applications or sensitive content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill recommends sudo apt-get install chromium-browser and sudo apt-get install nginx, granting or encouraging privileged package installation unrelated to core code scaffolding. This is dangerous because it normalizes elevation and system modification within a development skill, making accidental or coerced host compromise easier if the instructions are followed in sensitive environments.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The nginx setup instructs writing under /etc/nginx and reloading the system web server with sudo, which is infrastructure administration outside the stated scope of frontend scaffolding. Misuse can expose a development server externally, interfere with existing web services, or create an unintended ingress path to local content.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The chained sudo ln -s ... && sudo systemctl reload nginx combines multiple privileged operations in one step, reducing opportunities for review and making accidental misuse more likely. In this skill, chaining amplifies the risk of unintended infrastructure changes and external service exposure.

Content

Scanner excerpt · SKILL.md (reported line 54)May include surrounding context.

} }

text
- **Enable**: `sudo ln -s /etc/nginx/sites-available/<project-name> /etc/nginx/sites-enabled/ && sudo systemctl reload nginx`
- **If declined**: Access directly via `http://localhost:3002` (PM2 port)

**Before starting, ask user if they want to enable optional features.**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 196)May include surrounding context.

md
├── styles/                             # Global styles
│   └── globals.css                     # Tailwind imports + custom styles
│
├── .env.local                          # Environment variables (gitignored)
├── .env.example                        # Environment variables template
├── .eslintrc.json                      # ESLint config
├── .prettierrc                         # Prettier config

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states the skill triggers on very generic requests like 'build', 'create', 'develop', and 'add features', which can cause the skill to activate outside a narrowly intended UI-development context. In an agent setting, overly broad activation increases the chance of unexpected code generation, project scaffolding, or modification of an existing repository when the user did not clearly request those actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documented workflow includes project setup, dependency installation, environment setup, and export/deploy steps, but it does not warn users about filesystem changes, generated artifacts, or packaging outputs. In an automated agent context, this can lead to silent creation or modification of directories, config files, archives, and deployment-related assets, which is risky even if not overtly malicious.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says to use the skill when the user asks to "build, create, develop, or scaffold" a wide range of apps, and also when they ask to "add features" or "extend existing Next.js projects." These activation conditions are expansive and ambiguous enough to match many ordinary frontend or full-stack requests without clearly defining when this skill should or should not activate.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Embedding PM2-based service management in a UI scaffolding skill introduces host-level process control beyond simple project generation. This increases risk because the skill can start, stop, persist, and manage processes on the host, which is unnecessary for many build-only tasks and can affect other workloads if misapplied.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

This line explicitly directs use of sudo to install Chromium. Encouraging root execution inside a broadly triggered development skill increases the chance of privilege misuse and broadens the blast radius of any mistaken or maliciously influenced action.

Content

Scanner excerpt · SKILL.md (reported line 29)May include surrounding context.

md
#### 1. Auto-Revision with Visual Review (requires Chromium)
- **What it does**: Takes screenshots during development to visually review designs and auto-fix issues
- **Installation**: `sudo apt-get install chromium-browser` (Debian/Ubuntu)
- **Privileges**: Read/write access to project files, execute chromium in headless mode
- **If declined**: Manual review only (you describe, user verifies)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The live preview guidance exposes the app through nginx on an external port without a prominent warning about network exposure, authentication, or firewall implications. This can unintentionally publish in-progress applications, local APIs, or sensitive test data to other network users.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

This line instructs sudo apt-get install nginx, which introduces privileged package management not required for routine UI generation. Installing and enabling a system web server changes host exposure and increases attack surface.

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

2. Live Preview Server (requires Nginx)

  • What it does: Serves project on external port for live preview during development (useful for mobile testing or remote access)
  • Installation: sudo apt-get install nginx
  • How it works: PM2 runs dev server on port 3002, nginx proxies it to chosen external port
  • Nginx config template:
    nginx

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
98% confidence
Finding

This line chains privileged filesystem modification and service reload commands under /etc/nginx, directly exercising root-level system administration. Such instructions can alter production web-server behavior, expose local services, or disrupt existing configurations if executed blindly.

Content

Scanner excerpt · SKILL.md (reported line 54)May include surrounding context.

} }

text
- **Enable**: `sudo ln -s /etc/nginx/sites-available/<project-name> /etc/nginx/sites-enabled/ && sudo systemctl reload nginx`
- **If declined**: Access directly via `http://localhost:3002` (PM2 port)

**Before starting, ask user if they want to enable optional features.**

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.

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.

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.

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.

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.

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.