Next.js Pages Router Middleware Bypass Vulnerability in Internationalized Applications

Vulnerability

A vulnerability exists in Next.js applications using the Pages Router with internationalization (i18n) configured, along with middleware or proxy-based authorization. In these applications, unauthorized access to protected page data can be gained through locale-less data requests. The issue arises because middleware does not execute for the unprefixed data route, allowing attackers to obtain server-side rendered JSON for protected pages without the necessary authorization. This vulnerability affects Next.js versions 12.2.0 prior to 15.5.16 and 16.0.0 prior to 16.2.5.

Impact

Exploitation of this vulnerability allows unauthorized access to protected page data, bypassing intended authorization checks and potentially exposing sensitive information.

Remediation

Users can upgrade to Next.js versions 15.5.16 or 16.2.5 to address this vulnerability. If an immediate upgrade is not possible, authorization should be enforced in the page's server-side data path instead of relying solely on middleware.

Added: May 13, 2026, 8:01 PM
Updated: May 13, 2026, 8:01 PM

Vulnerability Rating

Custom Algorithm
spread
5.2
impact
2.5
exploitability
8.3
remediation
7.9
relevance
8.2
threat
0.0
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.