CVE-2025-29927: Next.js Middleware Authorization Bypass Flaw
Essential information
- Published
- 27/03/2025 18:47
- Modified
- 27/03/2025 19:22
- Tags
- 2025-03-27 CVE-2025-29927 authorization bypass javascript framework next.js vulnerability
- Related entities
- 1 vulnerabilities (cve), 5 techniques (mitre)
Description
A critical vulnerability, CVE-2025-29927, with a CVSS score of 9.1 was disclosed on March 21, 2025. This flaw allows attackers to bypass authorization checks in Next.js Middleware, potentially granting unauthorized access to protected resources. The vulnerability affects applications using Middleware for user authorization, session data validation, route access control, redirections, and UI visibility management. The issue stems from how the runMiddleware function handles the x-middleware-subrequest header. Attackers can craft malicious headers to bypass middleware controls. Affected versions range from 11.1.4 to 15.2.3. Users are urged to update to patched versions or implement mitigation strategies to block external requests containing the vulnerable header.