vercel-ai-sdk-attack-probe
Installation
SKILL.md
Vercel AI SDK Attack Probe
Authorized self-test for apps using the Vercel AI SDK. Follow shared probing conventions — discover endpoint via env or app/api/chat/route.ts, app/api/completion/route.ts, etc. Default Next.js port 3000. Pair with prompt-injection-probe.
Vercel-AI-SDK-specific attack surface
useChatendpoints are typically POSTs to/api/chatwith{ messages: CoreMessage[] }. They're often public — auth left as "TODO".streamText({ tools: { x: tool({ execute }) } })runsexecutewith the model's chosen args. The SDK enforces the zod schema, butz.string()is a wide-open hole if not narrowed (z.enum, regex).experimental_attachments(image/files passed byuseChat) are forwarded to the model unless the route handler validates size/MIME.- Output rendering: many demos pipe
streamTextoutput into<ReactMarkdown>with HTML enabled, or directly intodangerouslySetInnerHTML. Prompt-injected markdown becomes XSS. onFinishcallback often pipes content to remote telemetry — leakage vector.