route-handlers

Fail

Audited by Gen Agent Trust Hub on Jul 18, 2026

Risk Level: HIGHDATA_EXFILTRATIONPROMPT_INJECTION
Full Analysis
  • [DATA_EXFILTRATION]: The file download example in references/streaming-responses.md contains a path traversal vulnerability. It constructs a file path using path.join(process.cwd(), 'files', filename) where filename is an unvalidated user parameter from the URL, which could allow reading arbitrary files like .env and other sensitive configurations.
  • [DATA_EXFILTRATION]: The file upload example in references/http-methods.md is vulnerable to path traversal and arbitrary file overwrite. It uses the user-provided file.name to build the destination path path.join(process.cwd(), 'public/uploads', filename) without sanitization, allowing an attacker to overwrite files outside the intended directory.
  • [PROMPT_INJECTION]: The skill exhibits an indirect prompt injection attack surface (Category 8) by ingesting untrusted data through multiple channels without consistent validation.
  • Ingestion points: The skill reads from request.json(), request.formData(), and context.params in SKILL.md and references/http-methods.md.
  • Boundary markers: Most snippets do not use delimiters or instructions to ignore embedded commands within user-provided data.
  • Capability inventory: The skill demonstrates dangerous capabilities including file system writing (writeFile), file system reading (createReadStream), and database operations via Prisma.
  • Sanitization: While Zod is mentioned in one example, many other snippets provide code that directly interpolates untrusted input into file paths and database queries without validation.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Jul 18, 2026, 04:24 PM
Security Audit — agent-trust-hub — route-handlers