nextjs-developer

Warn

Audited by Gen Agent Trust Hub on Feb 23, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTIONDATA_EXFILTRATION
Full Analysis
  • [COMMAND_EXECUTION]: The uploadAvatar server action example in references/server-actions.md contains a Path Traversal vulnerability. It directly joins the user-provided file.name from FormData with a local directory path (path.join(process.cwd(), 'public', 'uploads', file.name)) before calling fs.writeFile. Without filename sanitization, an attacker could provide a path like ../../.env to overwrite sensitive application configuration files.\n- [PROMPT_INJECTION]: The skill documents patterns for using dangerouslySetInnerHTML and processing user-submitted data, creating a surface for Indirect Prompt Injection.\n
  • Ingestion points: Data enters the system via Server Actions (FormData), API route handlers (NextRequest), and external API calls (fetch) as shown in references/data-fetching.md and references/server-actions.md.\n
  • Boundary markers: While the skill suggests Zod for data validation, it lacks explicit prompt boundary markers when interpolating processed data into UI components.\n
  • Capability inventory: The skill's code templates include filesystem access (writeFile in references/server-actions.md), database mutations (via Prisma), and outbound network requests (fetch).\n
  • Sanitization: The skill recommends DOMPurify for HTML rendering and Zod for schema validation, but fails to apply sanitization to the file path in the upload example.\n- [DATA_EXFILTRATION]: In references/deployment.md, the vercel.json example demonstrates using Access-Control-Allow-Origin: "*". Although it includes a warning comment, providing this insecure configuration template increases the risk of developers implementing overly permissive CORS policies that allow unauthorized cross-origin data access.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Feb 23, 2026, 09:16 AM