React & Next.js
Security vulnerabilities specific to React and Next.js applications. XSS via dangerouslySetInnerHTML, token storage, source maps, CORS, and middleware issues.
7 vulnerabilities
dangerouslySetInnerHTML Without Sanitization
highUsing React's dangerouslySetInnerHTML with unsanitized user input allows attackers to inject malicious scripts that execute in other users' browsers.
Authentication Tokens in localStorage
highStoring JWT tokens, session tokens, or API keys in localStorage makes them accessible to any JavaScript running on the page, including XSS payloads.
__NEXT_DATA__ Secrets Exposure
highNext.js page props passed through getServerSideProps or getStaticProps leak sensitive data like API keys, database URLs, or internal configuration via the __NEXT_DATA__ script tag.
Source Maps Exposed in Production
mediumJavaScript source map files (.map) are publicly accessible in production, revealing the complete original source code including comments, variable names, and internal logic.
Open CORS in Next.js API Routes
mediumNext.js API routes configured with Access-Control-Allow-Origin: * allow any website to make authenticated cross-origin requests, enabling CSRF-like attacks.
No CSRF on Server Actions
mediumServer Actions called from malicious third-party sites without origin validation, letting attackers trigger state-changing requests on behalf of logged-in users.
Next.js Middleware Bypass (CVE-2025-29927)
criticalA critical vulnerability in Next.js versions before 15.2.3 allows attackers to bypass middleware-based auth checks entirely by sending a crafted internal header.