/

CVE-2026-44573

Severity:

HIGH RISK

(7.5)

Missing Authorization in Next.js Pages Router i18n Data

CVE-2026-44573

Modified

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-863, CWE-551

Impact:

Unauthorized Access to Protected Page Data

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A missing authorization check in certain Next.js Pages Router configurations allows locale-less /_next/data/<buildId>/<page>.json requests to bypass middleware or proxy-based access controls.

When internationalization (i18n) is enabled and authorization relies on middleware or reverse proxies, attackers may retrieve server-side rendered JSON data for protected pages without passing the intended checks.

Affected context

This vulnerability arises in Next.js applications that:

  • Use the Pages Router (not purely the App Router),
  • Have i18n (internationalization) configured, and
  • Rely on middleware-based or proxy-based authorization for route protection.

In these setups, page data is exposed through /_next/data/<buildId>/<page>.json endpoints. While localized routes are typically subject to middleware, the unprefixed (locale-less) data route may not trigger the same authorization logic, leaving protected content accessible without authentication or authorization in certain configurations.

Exploit preconditions

  • Attack surface: Public HTTP endpoints of the Next.js application.
  • Required access: Network access to the target application; no prior authentication necessarily required if public endpoints are reachable.
  • Trigger point: Direct requests to locale-less data URLs such as:

/_next/data/<buildId>/<page>.json

that correspond to pages normally protected by middleware or proxy-based checks.

  • Why exploitation is possible: The i18n configuration and routing behavior cause middleware or upstream authorization layers to run on localized paths (for example, /en/protected) but not on the underlying locale-less data route. As a result, the server renders and returns SSR JSON for protected pages without enforcing the intended access controls.

Why this happens

The core issue is a missing authorization check on an alternative data-fetching endpoint that serves the same sensitive content as the protected page route.

In Next.js Pages Router setups with i18n, localized paths and their internal data routes are treated differently by the routing layer and middleware. The middleware/proxy access control is applied to the user-facing, locale-prefixed URL but not consistently to the unprefixed /_next/data/... endpoint. This mismatch creates an authorization gap where the same protected resource is available through another path that lacks enforcement, aligning with CWE-863: Incorrect Authorization.

Potential impact

  • Unauthorized retrieval of SSR JSON for pages intended to be protected behind authentication or role-based access control.
  • Exposure of sensitive business data embedded in page props (e.g., user profile details, internal identifiers, or configuration).
  • Leakage of information useful for further attacks, such as internal API shapes, feature flags, or access tokens mistakenly embedded in page data.
  • Potential inference of application logic, authorization decisions, and internal resource relationships.

General mitigation guidance

Risk reduction focuses on removing authorization gaps across all routes that expose protected content:

  • Ensure that all routes serving sensitive data, including /_next/data/... endpoints, are covered by the same authorization checks as their corresponding page URLs.
  • Favor centralized, declarative authorization per route or resource, instead of relying solely on derived paths or assumptions about routing structure.
  • Avoid placing sensitive information directly into SSR JSON unless strictly necessary; minimize data to what is required for rendering.
  • When using middleware, design patterns so that data routes and page routes share the same protection logic, for example by matching on underlying pathname patterns rather than specific locales.
  • Implement defense in depth by validating session/authorization within the server-side data fetching logic (e.g., server-side handlers) before returning sensitive props.

How teams detect issues like this

Effective detection typically involves a mix of code review, testing, and automated analysis:

  • Code review patterns:
  • Identify pages that are considered protected but whose data is exposed through getServerSideProps or similar mechanisms without in-function authorization checks.
  • Look for reliance on middleware or proxies as the sole enforcement layer for routes that have corresponding /_next/data/... endpoints.
  • Static and configuration analysis:
  • Use automated tooling or custom scripts to enumerate all page routes and infer their data endpoints, then cross-check which ones are expected to be protected.
  • Flag configurations where i18n and middleware are used together without explicit handling of /_next/data paths.
  • Dynamic testing:
  • During security testing, attempt direct access to /_next/data/<buildId>/<page>.json for protected pages and verify whether data is returned without proper authorization.
  • Integrate these checks into CI/CD pipeline tests as part of a regression suite for access control.
  • Runtime monitoring:
  • Add logging or observability around /_next/data/... requests to detect unusual access patterns to data routes associated with sensitive pages.

Sources

SourceLink
github.comgithub.com/vercel/next.js/security/advisories/GHSA-36qx-fr4f-26g5
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34608
access.redhat.comaccess.redhat.com/errata/RHSA-2026:37272
access.redhat.comaccess.redhat.com/errata/RHSA-2026:40974
access.redhat.comaccess.redhat.com/errata/RHSA-2026:54435
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-44573
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2477199
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44573.json

Frequently asked

questions

Yes. If the affected Next.js application is exposed over the internet and uses an impacted configuration, an external attacker can directly query locale-less /_next/data/... endpoints to attempt to retrieve protected page data.

Not necessarily. The key requirement is network access to the application. If the protected pages are intended to require authentication but the data route does not enforce it, an unauthenticated attacker may still obtain the SSR JSON for those pages.

Ensure that all content considered protected is subject to consistent authorization checks at every exposure point. That usually means:

  • Applying the same authorization logic to data routes and page routes, and
  • Performing explicit access checks inside the server-side data-fetching or handler functions, rather than depending solely on middleware or proxies.

Adopt a design where authorization is tied to the resource, not the URL shape, and perform security reviews whenever new routing or i18n configurations are introduced. Automated tests should attempt to access data and page routes for protected resources directly, and security tooling should be configured to look for routes that return sensitive data without in-function authorization checks.

Find out what's already
exploitable in your codebase.