Next.js security posture

While Next.js provides robust defaults like automatic XSS protection and built-in CSRF measures for certain hooks, complex Server Action implementations and custom API routes often introduce critical security gaps in production environments.

2 linked rules in the directory.

What the framework handles

FeatureStatus
XSS PreventionBUILT-IN
Route ProtectionMANUAL CFG
CORS PolicyMANUAL CFG
Header SecurityBUILT-IN
Environment IsolationBUILT-IN

Rule coverage

TypeDescriptionExplore
Security patternsALWAYS/NEVER safe-coding directivesExplore →
Dependency alertsCVE advisories for this stack's packagesExplore →