Vibecoding Patterns
Security mistakes commonly found in AI-generated code from tools like Cursor, Copilot, and Claude. The code works, but it's often insecure.
10 vulnerabilities
Hardcoded API Keys
criticalAPI keys, tokens, or secrets written directly in source code, making them visible to anyone with repo access — including public GitHub repositories.
No Input Validation
mediumUser-supplied data sent directly to databases or external APIs without any type, format, or content validation.
Passwords Stored in Plaintext
criticalUser passwords stored as raw strings in the database instead of being hashed with a proper algorithm like bcrypt or Argon2.
JWT Without Expiration
highJWTs signed without an `exp` claim that never expire, meaning a stolen token grants permanent access with no way to revoke it.
Auth Logic in Frontend Only
highShowing or hiding UI elements based on user role in React, without any server-side enforcement — easily bypassed by anyone who opens DevTools.
Endpoints Without Authentication
highAPI routes that perform sensitive operations — reading user data, modifying records, deleting resources — with no session or token verification.
Verbose Error Messages
mediumDetailed error messages, stack traces, or internal paths sent to the client or logged publicly, giving attackers a map of your application internals.
Outdated Dependencies with Known CVEs
mediumnpm packages or other dependencies with published security vulnerabilities (CVEs) that haven't been updated, leaving known attack vectors open in your app.
eval() with User Input
criticalPassing user-controlled data to eval(), new Function(), or similar dynamic code execution functions, enabling arbitrary code execution on your server.
Secrets in Committed .env Files
criticalA .env file containing real credentials committed to git, making all secrets permanently accessible to anyone with repo access — including through git history.