7.5high
Authorization bypass in Next.js
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 4.17% (higher than 92% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7gfc-8cq8-jh5f
Description
Next.js is a React framework for building full-stack web applications. In affected versions if a Next.js application is performing authorization in middleware based on pathname, it was possible for this authorization to be bypassed for pages directly under the application's root directory. For example: * [Not affected] `https://example.com/` * [Affected] `https://example.com/foo` * [Not affected] `https://example.com/foo/bar`. This issue is patched in Next.js `14.2.15` and later. If your Next.js application is hosted on Vercel, this vulnerability has been automatically mitigated, regardless of Next.js version. There are no official workarounds for this vulnerability.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vercel next.js | >= 9.5.5, < 14.2.15, from 9.5.5 before 14.2.15 | CVE List, NVD |
| next (npm) | from 9.5.5 before 14.2.15 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
Next.js is a React framework for building full-stack web applications. In affected versions if a Next.js application is performing authorization in middleware based on pathname, it was possible for this authorization to be bypassed for pages directly under the application's root directory. For example: * [Not affected] `https://example.com/` * [Affected] `https://example.com/foo` * [Not affected] `https://example.com/foo/bar`. This issue is patched in Next.js `14.2.15` and later. If your Next.js application is hosted on Vercel, this vulnerability has been automatically mitigated, regardless of Next.js version. There are no official workarounds for this vulnerability.
GitHub Advisory Database
Impact
If a Next.js application is performing authorization in middleware based on pathname, it was possible for this authorization to be bypassed.
Patches
This issue was patched in Next.js 14.2.15 and later.
If your Next.js application is hosted on Vercel, this vulnerability has been automatically mitigated, regardless of Next.js version.
Workarounds
There are no official workarounds for this vulnerability.
Credits
We'd like to thank tyage (GMO CyberSecurity by IERAE) for responsible disclosure of this issue.
NVD (es)
Next.js es un framework de trabajo de React para crear aplicaciones web de pila completa. En las versiones afectadas, si una aplicación Next.js realiza una autorización en middleware basada en una ruta de acceso, era posible omitir esta autorización para las páginas que se encuentran directamente bajo el directorio raíz de la aplicación. Por ejemplo: * [No afectado] `https://example.com/` * [Afectado] `https://example.com/foo` * [No afectado] `https://example.com/foo/bar`. Este problema se solucionó en Next.js `14.2.15` y versiones posteriores. Si su aplicación Next.js está alojada en Vercel, esta vulnerabilidad se ha mitigado automáticamente, independientemente de la versión de Next.js. No existen workarounds oficiales para esta vulnerabilidad.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-51479 changed 2024-12-17 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7gfc-8cq8-jh5f changed 2025-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-51479 changed 2026-06-17 | Public domain |