Skip to main content
Platform security guideReviewed

Next.js security testing, route by route

Middleware, Server Actions, route handlers, server components, caching and build-time secrets each fail in their own way.

This guide shows how a Next.js application is tested at each of those points, which published advisories matter, and how to tell whether your deployment is affected.

Next.js advisory ledger

Find each row whose conditions match your application, compare the resolved next version in your deployed build with the fixed releases, then use the last two columns to plan a safe check and the evidence a retest needs. Rows were checked against the GitHub Advisory Database, the Next.js security posts and the CISA alert on 13 November 2026.

10 rows

Next.js advisory ledger

AdvisoryAffected whenFixed releasesSafe checkRetest evidence
CVE-2025-29927 (GHSA-f82v-jwr5-mffw): authorisation checks made in middleware can be bypassed. Critical, CVSS v3.1 9.1.Next.js 12.0.0 to before 12.3.5, 13.0.0 to before 13.5.9, 14.0.0 to before 14.2.25, or 15.0.0 to before 15.2.3, with an authorisation decision made in middleware. The advisory says deployments hosted on Vercel are automatically protected, and points 11.x users to the workaround.12.3.5, 13.5.9, 14.2.25 and 15.2.3. Workaround: stop external requests carrying the x-middleware-subrequest header from reaching the app.With no session, request one protected page normally and again with the header the advisory names, then compare status codes and bodies. Both requests only read a page.The resolved next version in the deployed build, and the same request pair returning the same refusal. If the header is stripped at the edge instead, the edge rule is recorded too.
CVE-2026-44573, CVE-2026-44574 and CVE-2026-44575: middleware and proxy bypasses through alternative URL forms. High, CVSS v3.1 7.5 to 8.1. CVE-2026-45109 is the follow-up fix for CVE-2026-44575.Authorisation relies on middleware or proxy, and: Pages Router with i18n on Next.js 12.2.0 to before 15.5.16, through locale-less /_next/data requests (CVE-2026-44573); Next.js 15.4.0 to before 15.5.16, through query parameters that alter a dynamic route value (CVE-2026-44574); App Router on Next.js 15.2.0 to before 15.5.16, through .rsc and segment-prefetch URLs (CVE-2026-44575). All three also cover 16.0.0 to before 16.2.5. CVE-2026-45109 covers middleware.ts built with Turbopack on 15.2.0 to before 15.5.18 and 16.0.0 to before 16.2.6.15.5.16 and 16.2.5 for the first three; 15.5.18 and 16.2.6 for CVE-2026-45109. Workaround in the first three advisories: enforce authorisation in the page, route or server-side data path, not in middleware alone. The CVE-2026-45109 advisory gives no workaround.With no session and then as a lower role, request each protected page through its data route, its RSC and prefetch forms, and with an extra query parameter, and compare each response with the direct request.Version evidence, plus one request and response per URL form per protected page, each showing the same refusal as the direct request.
CVE-2026-64642 (GHSA-6gpp-xcg3-4w24): middleware and proxy bypass in App Router apps built with Turbopack and a single locale. High, CVSS v4 8.3.Next.js 16.0.0 to before 16.2.11, App Router built with Turbopack, exactly one entry in config.i18n.locales, and authentication enforced in middleware or proxy.16.2.11. Workaround: enforce authorisation in the page's server-side data path.Read the build setup and locales list to confirm the condition, then run the same protected-page comparison as the row above.Version evidence, the configuration excerpt, and the repeated comparison showing the same refusal on every form.
CVE-2025-55182, known as React2Shell (GHSA-fv66-9v8q-g76r for React, GHSA-9qr9-h5gf-34mp for Next.js): unauthenticated remote code execution through React Server Components. Critical, CVSS v3.1 10.0.App Router applications on Next.js 15.x or 16.x below the fixed release in their line, and canary releases from 14.3.0-canary.77. Not affected: 13.x, 14.x stable, Pages Router applications and the Edge Runtime. CISA added CVE-2025-55182 to its Known Exploited Vulnerabilities catalogue on 5 December 2025.15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7 and 16.0.7. React packages: 19.0.1, 19.1.2 and 19.2.1. The Next.js advisory gives no workaround; upgrading is required.Version and router evidence only. No exploit payload is sent, because the flaw runs code on your server.The resolved next version in the deployed build. If the app was online and unpatched as of 4 December 2025 at 1:00 pm PT, a record of the secrets rotated, as the Next.js advisory recommends.
CVE-2025-55183, CVE-2025-55184 and CVE-2025-67779: React2Shell follow-ups. Source code exposure (medium) and denial of service (high).App Router applications. CVE-2025-55183: a crafted request makes a Server Function return the compiled source of other Server Functions, on 15.x and 16.x. CVE-2025-55184: a crafted request hangs the server, on 13.3 and later. Its first fix was incomplete, so apps upgraded only to the first recommended releases need CVE-2025-67779's later ones.14.2.35, 15.0.7, 15.1.11, 15.2.8, 15.3.8, 15.4.10, 15.5.9 and 16.0.10, as amended in the Next.js update of 11 December 2025.Version evidence only; no denial-of-service request is sent. Where code access is agreed, check whether any Server Function holds a secret written into its code.Version evidence, and any secret found in Server Function code moved to a runtime environment variable and rotated.
CVE-2026-27978 (GHSA-mq59-m269-xvcx): a null Origin bypasses the Server Actions CSRF check. Moderate, CVSS v4 5.3.Next.js 16.0.1 to before 16.1.7 with Server Actions. Requests from opaque contexts such as sandboxed iframes were treated as having no origin at all.16.1.7. Do not allow null in serverActions.allowedOrigins unless it is required and separately protected.As a test user, send a state-changing Server Action request with Origin set to null and confirm it is rejected as cross-origin. Only test records can change.Version evidence, the rejected request and response, and the allowedOrigins setting from next.config.
CVE-2026-64643 (GHSA-955p-x3mx-jcvp): Server Action and use cache endpoint IDs disclosed in public client files. Moderate, CVSS v4 6.3.App Router applications using Server Actions on Next.js 13.0.0 to before 15.5.21 or 16.0.0 to before 16.2.11. The advisory calls the disclosure a reconnaissance step that raises risk when combined with other weaknesses, such as an action that skips its own check.15.5.21 and 16.2.11. Workaround: authenticate inside every use server and use cache function.Collect action IDs from the public JavaScript, then call each with no session and as the wrong user or organisation, using test records only.Version evidence, plus each action called without a session returning a refusal and changing nothing.
CVE-2026-64649 (GHSA-89xv-2m56-2m9x): server-side request forgery in Server Actions when the Host header is not pinned. High, CVSS v4 8.3.Next.js 14.1.1 to before 15.5.21 or 16.0.0 to before 16.2.11, a Server Action that forwards or redirects, and an incoming host that is not fixed to a trusted value, typically on a custom server. The advisory says managed hosting is not affected, and that next start and standalone output pin the host from 14.2 onward.15.5.21 and 16.2.11. Workaround: pin or validate Host and X-Forwarded-Host at the edge or proxy.Send a Server Action request with a changed Host header that points at a receiver set up for the test, and record whether the server makes an outbound request to it. No internal address is targeted.Version evidence and the same request producing no outbound call.
CVE-2026-94545 (GHSA-vcvr-r3jv-pc5j): remote code execution in the Node.js ImageResponse from next/og. Critical, CVSS v4 9.5.Next.js 16.2.0 to before 16.3.6, with request input passed into SVG content, attributes or styles during image generation. The Edge ImageResponse is not affected.16.3.6. Workaround: keep attacker-controlled values out of SVG content, attributes and styles.Review each image route's code to see whether request input reaches the SVG markup. No exploit payload is sent.Version evidence and the reviewed route code.
CVE-2026-96889 (GHSA-2464-fhr4-w9xw) and GHSA-673q-mjm6-r5xr (no CVE id): remote code execution in image optimisation when SVG files are used, and in use cache functions that return typed arrays. Critical, CVSS v4 9.5 each.Image optimisation: Next.js 10.0.0 to 15.5.27 or 16.0.0 to 16.4.0, running on glibc-based Linux. use cache: App Router with Cache Components on 16.0.0 to 16.4.0, with a use cache function that returns multiple typed arrays.Image optimisation: 15.5.28 and 16.4.1, or a sharp version of 0.35.5 or later. use cache: 16.4.1, which the advisory says to install even without such a function.Version, host operating system and installed sharp version, read from the build. Neither flaw is exploited in a test.Version evidence for next and sharp from the deployed build.

Advisory

Affected when

  1. CVE-2025-29927 (GHSA-f82v-jwr5-mffw): authorisation checks made in middleware can be bypassed. Critical, CVSS v3.1 9.1.
    Affected when
    Next.js 12.0.0 to before 12.3.5, 13.0.0 to before 13.5.9, 14.0.0 to before 14.2.25, or 15.0.0 to before 15.2.3, with an authorisation decision made in middleware. The advisory says deployments hosted on Vercel are automatically protected, and points 11.x users to the workaround.
    Fixed releases
    12.3.5, 13.5.9, 14.2.25 and 15.2.3. Workaround: stop external requests carrying the x-middleware-subrequest header from reaching the app.
    Safe check
    With no session, request one protected page normally and again with the header the advisory names, then compare status codes and bodies. Both requests only read a page.
    Retest evidence
    The resolved next version in the deployed build, and the same request pair returning the same refusal. If the header is stripped at the edge instead, the edge rule is recorded too.
  2. CVE-2026-44573, CVE-2026-44574 and CVE-2026-44575: middleware and proxy bypasses through alternative URL forms. High, CVSS v3.1 7.5 to 8.1. CVE-2026-45109 is the follow-up fix for CVE-2026-44575.
    Affected when
    Authorisation relies on middleware or proxy, and: Pages Router with i18n on Next.js 12.2.0 to before 15.5.16, through locale-less /_next/data requests (CVE-2026-44573); Next.js 15.4.0 to before 15.5.16, through query parameters that alter a dynamic route value (CVE-2026-44574); App Router on Next.js 15.2.0 to before 15.5.16, through .rsc and segment-prefetch URLs (CVE-2026-44575). All three also cover 16.0.0 to before 16.2.5. CVE-2026-45109 covers middleware.ts built with Turbopack on 15.2.0 to before 15.5.18 and 16.0.0 to before 16.2.6.
    Fixed releases
    15.5.16 and 16.2.5 for the first three; 15.5.18 and 16.2.6 for CVE-2026-45109. Workaround in the first three advisories: enforce authorisation in the page, route or server-side data path, not in middleware alone. The CVE-2026-45109 advisory gives no workaround.
    Safe check
    With no session and then as a lower role, request each protected page through its data route, its RSC and prefetch forms, and with an extra query parameter, and compare each response with the direct request.
    Retest evidence
    Version evidence, plus one request and response per URL form per protected page, each showing the same refusal as the direct request.
  3. CVE-2026-64642 (GHSA-6gpp-xcg3-4w24): middleware and proxy bypass in App Router apps built with Turbopack and a single locale. High, CVSS v4 8.3.
    Affected when
    Next.js 16.0.0 to before 16.2.11, App Router built with Turbopack, exactly one entry in config.i18n.locales, and authentication enforced in middleware or proxy.
    Fixed releases
    16.2.11. Workaround: enforce authorisation in the page's server-side data path.
    Safe check
    Read the build setup and locales list to confirm the condition, then run the same protected-page comparison as the row above.
    Retest evidence
    Version evidence, the configuration excerpt, and the repeated comparison showing the same refusal on every form.
  4. CVE-2025-55182, known as React2Shell (GHSA-fv66-9v8q-g76r for React, GHSA-9qr9-h5gf-34mp for Next.js): unauthenticated remote code execution through React Server Components. Critical, CVSS v3.1 10.0.
    Affected when
    App Router applications on Next.js 15.x or 16.x below the fixed release in their line, and canary releases from 14.3.0-canary.77. Not affected: 13.x, 14.x stable, Pages Router applications and the Edge Runtime. CISA added CVE-2025-55182 to its Known Exploited Vulnerabilities catalogue on 5 December 2025.
    Fixed releases
    15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7 and 16.0.7. React packages: 19.0.1, 19.1.2 and 19.2.1. The Next.js advisory gives no workaround; upgrading is required.
    Safe check
    Version and router evidence only. No exploit payload is sent, because the flaw runs code on your server.
    Retest evidence
    The resolved next version in the deployed build. If the app was online and unpatched as of 4 December 2025 at 1:00 pm PT, a record of the secrets rotated, as the Next.js advisory recommends.
  5. CVE-2025-55183, CVE-2025-55184 and CVE-2025-67779: React2Shell follow-ups. Source code exposure (medium) and denial of service (high).
    Affected when
    App Router applications. CVE-2025-55183: a crafted request makes a Server Function return the compiled source of other Server Functions, on 15.x and 16.x. CVE-2025-55184: a crafted request hangs the server, on 13.3 and later. Its first fix was incomplete, so apps upgraded only to the first recommended releases need CVE-2025-67779's later ones.
    Fixed releases
    14.2.35, 15.0.7, 15.1.11, 15.2.8, 15.3.8, 15.4.10, 15.5.9 and 16.0.10, as amended in the Next.js update of 11 December 2025.
    Safe check
    Version evidence only; no denial-of-service request is sent. Where code access is agreed, check whether any Server Function holds a secret written into its code.
    Retest evidence
    Version evidence, and any secret found in Server Function code moved to a runtime environment variable and rotated.
  6. CVE-2026-27978 (GHSA-mq59-m269-xvcx): a null Origin bypasses the Server Actions CSRF check. Moderate, CVSS v4 5.3.
    Affected when
    Next.js 16.0.1 to before 16.1.7 with Server Actions. Requests from opaque contexts such as sandboxed iframes were treated as having no origin at all.
    Fixed releases
    16.1.7. Do not allow null in serverActions.allowedOrigins unless it is required and separately protected.
    Safe check
    As a test user, send a state-changing Server Action request with Origin set to null and confirm it is rejected as cross-origin. Only test records can change.
    Retest evidence
    Version evidence, the rejected request and response, and the allowedOrigins setting from next.config.
  7. CVE-2026-64643 (GHSA-955p-x3mx-jcvp): Server Action and use cache endpoint IDs disclosed in public client files. Moderate, CVSS v4 6.3.
    Affected when
    App Router applications using Server Actions on Next.js 13.0.0 to before 15.5.21 or 16.0.0 to before 16.2.11. The advisory calls the disclosure a reconnaissance step that raises risk when combined with other weaknesses, such as an action that skips its own check.
    Fixed releases
    15.5.21 and 16.2.11. Workaround: authenticate inside every use server and use cache function.
    Safe check
    Collect action IDs from the public JavaScript, then call each with no session and as the wrong user or organisation, using test records only.
    Retest evidence
    Version evidence, plus each action called without a session returning a refusal and changing nothing.
  8. CVE-2026-64649 (GHSA-89xv-2m56-2m9x): server-side request forgery in Server Actions when the Host header is not pinned. High, CVSS v4 8.3.
    Affected when
    Next.js 14.1.1 to before 15.5.21 or 16.0.0 to before 16.2.11, a Server Action that forwards or redirects, and an incoming host that is not fixed to a trusted value, typically on a custom server. The advisory says managed hosting is not affected, and that next start and standalone output pin the host from 14.2 onward.
    Fixed releases
    15.5.21 and 16.2.11. Workaround: pin or validate Host and X-Forwarded-Host at the edge or proxy.
    Safe check
    Send a Server Action request with a changed Host header that points at a receiver set up for the test, and record whether the server makes an outbound request to it. No internal address is targeted.
    Retest evidence
    Version evidence and the same request producing no outbound call.
  9. CVE-2026-94545 (GHSA-vcvr-r3jv-pc5j): remote code execution in the Node.js ImageResponse from next/og. Critical, CVSS v4 9.5.
    Affected when
    Next.js 16.2.0 to before 16.3.6, with request input passed into SVG content, attributes or styles during image generation. The Edge ImageResponse is not affected.
    Fixed releases
    16.3.6. Workaround: keep attacker-controlled values out of SVG content, attributes and styles.
    Safe check
    Review each image route's code to see whether request input reaches the SVG markup. No exploit payload is sent.
    Retest evidence
    Version evidence and the reviewed route code.
  10. CVE-2026-96889 (GHSA-2464-fhr4-w9xw) and GHSA-673q-mjm6-r5xr (no CVE id): remote code execution in image optimisation when SVG files are used, and in use cache functions that return typed arrays. Critical, CVSS v4 9.5 each.
    Affected when
    Image optimisation: Next.js 10.0.0 to 15.5.27 or 16.0.0 to 16.4.0, running on glibc-based Linux. use cache: App Router with Cache Components on 16.0.0 to 16.4.0, with a use cache function that returns multiple typed arrays.
    Fixed releases
    Image optimisation: 15.5.28 and 16.4.1, or a sharp version of 0.35.5 or later. use cache: 16.4.1, which the advisory says to install even without such a function.
    Safe check
    Version, host operating system and installed sharp version, read from the build. Neither flaw is exploited in a test.
    Retest evidence
    Version evidence for next and sharp from the deployed build.

Why Next.js security is mostly about server entry points

A Next.js application has more doors than its pages suggest.

Every page renders on the server, every route handler answers HTTP requests on its own, every Server Action is a POST endpoint the browser calls by ID, and the framework adds routes of its own for data, prefetching and image optimisation.

The Next.js documentation is direct about the consequence: treat Server Actions and route handlers with the same security considerations as public-facing API endpoints, and check that the caller is allowed to use them.

That decides how a useful test is built. Clicking through the interface as each role shows what the screens allow. It does not show what the server allows, because the serious Next.js problems sit in requests the interface never sends: a Server Action called with no session, a route handler asked for another customer's record, a protected page reached through a URL form the middleware does not match.

Testing a Next.js application means listing those entry points and sending each one the requests it ought to refuse.

Two kinds of risk need separating. Framework advisories are flaws in Next.js or React themselves, closed by upgrading to a patched release. Application flaws live in your own code, such as an action that never checks who owns a record, and no upgrade touches them. The advisory ledger on this page deals with the first kind and the route-by-route matrix with the second.

One naming note: from Next.js 16 the middleware file convention is called proxy, with the same behaviour, so this page says middleware for both, as the advisories do.

Middleware is a filter, not the authorisation boundary

Middleware runs before a route renders, which makes it tempting to hang every login rule on it.

The Next.js documentation recommends it for optimistic checks that read the session from a cookie and redirect early. It says middleware should not be used as a full session management or authorisation solution, and that most checks belong as close as possible to the data source.

The advisory record shows why. CVE-2025-29927, published in March 2025 and rated critical, allowed authorisation checks in middleware to be bypassed. In May 2026 three more advisories described protected content reached through URL forms the middleware did not match: locale-less data routes in Pages Router apps using i18n (CVE-2026-44573), query parameters that alter a dynamic route value (CVE-2026-44574), and .rsc and segment-prefetch URLs in the App Router (CVE-2026-44575).

The fix for the last of those then needed a follow-up, CVE-2026-45109, for middleware.ts built with Turbopack.

The workaround given in the three May advisories is the same: enforce authorisation in the route, page or server-side data path instead of relying on middleware alone. The advisory for CVE-2026-45109 gives no workaround and points to its fixed releases.

Server Actions add a quieter gap. The proxy reference explains that Server Functions are not separate routes. They are POST requests to the page that uses them, so a matcher that excludes a path also skips the actions on that path, and moving an action during a refactor can remove the check without anyone noticing.

A test therefore treats middleware as one layer and confirms that each protected page, handler and action refuses the wrong caller by itself.

The route-by-route test matrix

Each part of the matrix is one kind of entry point.

For each, the test lists the instances in your application, sends the requests below as every role and, for multi-tenant apps, from an account in a second customer organisation, and keeps the request and response that prove the result. A pass means the server refused or filtered the request, not that the interface hid a button.

Middleware and proxy

Start from the matcher. 1 min read

Server Actions

Next.js states that an exported Server Action is reachable by a direct POST request, not only through your interface, and that a page-level login check does not extend to the actions defined on that page. 1 min read

Route handlers and API routes

Route handlers (route.ts in the App Router, API routes in the Pages Router) are plain HTTP endpoints. 1 min read

Server components, props and the RSC payload

Server Components can read the database and secrets directly, and whatever they pass to a Client Component is serialised into the page. 1 min read

Secrets in client bundles and source maps

Environment variables stay on the server unless their name starts with NEXT_PUBLIC_. 1 min read

Caching and tenancy

Caching is where one customer's data can reach another without any access check failing. 1 min read

Authentication providers

Clerk, Auth0, Auth.js, Supabase Auth and hand-built sessions all connect to Next.js in similar places. 1 min read

React2Shell and its follow-ups: what to check

CVE-2025-55182, which the Next.js team refers to as React2Shell, is an unauthenticated remote code execution flaw in React Server Components, rated CVSS 10.0.

It reached Next.js through the App Router. The Next.js advisory lists 15.x, 16.x and canary releases from 14.3.0-canary.77 as affected, and 13.x, 14.x stable, Pages Router applications and the Edge Runtime as not affected. CISA added the flaw to its Known Exploited Vulnerabilities catalogue on 5 December 2025, based on evidence of active exploitation.

Patching closes the flaw but says nothing about what happened before the patch. The Next.js advisory recommends rotating secrets for any application that was online and unpatched as of 4 December 2025 at 1:00 pm PT. CISA updated its alert on 9 December 2025 to advise checking internet-accessible React instances for signs of compromise after applying mitigations.

A web application test can confirm the deployed version and which routes are exposed. It cannot rule out a past compromise. That is incident response work, and we refer it to a specialist.

Researchers examining the React2Shell patches found two more issues, which Next.js published on 11 December 2025. CVE-2025-55183 lets a crafted request make a Server Function return the compiled source of other Server Functions. CVE-2025-55184 is a request that hangs the server. The first fix for CVE-2025-55184 was incomplete and was completed under CVE-2025-67779, so an application upgraded to the releases recommended on 3 December, or to the first releases recommended on 11 December, needs a further upgrade. The amended list includes 14.2.35, 15.5.9 and 16.0.10, and the ledger carries the full set.

How to tell if your Next.js deployment is affected

The version in package.json is often a range.

The version that matters is the one inside the build that is serving traffic. Work through these steps in order, then read across the ledger rows that match.

  • Read the resolved next version from the lockfile of the commit that was deployed. If staging and production run different builds, check both.
  • For React2Shell and its follow-ups, check the next version, not only react. The Next.js advisories give the fixes as next releases.
  • Note the conditions the ledger rows depend on: App Router or Pages Router, i18n, Turbopack, use cache, next/og, image optimisation with SVG files, a custom server, and the operating system of the host. Several rows apply only when one of them is present.
  • Note how the app is hosted. Some advisories exclude managed hosting: the CVE-2025-29927 advisory says Vercel-hosted deployments are automatically protected, and the CVE-2026-64649 advisory says managed hosting is not affected. A self-hosted or custom-server deployment has to be checked against the conditions directly.
  • Check whether your release line has a fix at all. CVE-2026-44573 reaches back to Next.js 12.2.0 but lists patched releases only at 15.5.16 and 16.2.5, so a 13.x or 14.x Pages Router app using i18n has to move up a major version or apply the workaround.
  • Upgrade to the newest patched release in your line, redeploy, and confirm the deployed build reports the new version before you mark a row closed.
  • Remember that an upgrade fixes framework flaws only. A missing ownership check in your own Server Action is still there afterwards, which is why the matrix runs whatever the version.

Where the ledger stops

The ledger is a working subset: the advisories that change how routes are tested, or that carry remote code execution. The GitHub Advisory Database lists every published advisory for the next package, including denial-of-service and lower-severity cache issues not repeated here, and it is the list to check before each release.

At the ledger's last review on 13 November 2026, the two critical advisories published in October 2026 were fixed in Next.js 16.4.1, and the one that also reaches the 15.x line was fixed in Next.js 15.5.28.

Verifying an advisory without harming the deployment

A ledger row is only useful if it can be confirmed on a live system without causing the damage it describes.

The rule is to prove exposure with the least force that proves it.

  • Remote code execution and memory-safety rows are confirmed from version, configuration and host details. No exploit payload is sent to your server.
  • Denial-of-service rows are confirmed from the version alone. Clever Ops does not run denial-of-service testing.
  • Middleware bypass rows are confirmed by reading a protected test page or test record with no session or a lower role. Reading a page changes nothing.
  • Server Action rows use test accounts and test records, and anything created is listed for removal.
  • Cache rows run on staging, or with a cache key unique to the test, for the same reason as in the matrix above.

What counts as retest evidence

The same evidence becomes the retest. Every row records the next version in the deployed build and the commit it was built from. Rows that were confirmed by a request also repeat that request on the new build and record the new response. Rows confirmed from version and configuration alone, such as the remote code execution rows, are closed on the new version and configuration, and the report says that was the basis, because a version number shows the framework changed and nothing about your own routes.

Next.js security checklist for your developers

These are the Next.js security best practices the matrix tests for, drawn from the framework's own documentation.

Working through them before a test leaves the test to find what slipped past.

  • Put authorisation in a server-only data access layer that every page, action and handler calls, and check ownership of the record, not only that someone is signed in.
  • Treat each Server Action as a public endpoint: authenticate, authorise and validate inside it, and return only what the screen needs.
  • Use middleware for redirects and optimistic checks, never as the only check on a protected page or action.
  • Pass Client Components the fields they render, not whole records, and import server-only in data modules so they cannot be pulled into client code.
  • Keep secrets out of NEXT_PUBLIC_ variables and out of source code, and leave production browser source maps off unless you need them.
  • Pass user and organisation identity into every cached function, and keep personalised responses out of shared caches.
  • When self-hosting across several instances, set NEXT_SERVER_ACTIONS_ENCRYPTION_KEY so every instance shares one key, and keep serverActions.allowedOrigins to the hosts you actually use.
  • Watch the advisories for the next package, upgrade within your release line, rebuild, and confirm the deployed version.

What to send before a Next.js test

Listing the entry points in advance lets the testing window go on the requests that matter rather than on discovery.

Send what you can of the following.

  • The deployed next version and lockfile, next.config, and the middleware or proxy file with its matcher.
  • A list of route handlers and Server Actions, or read-only access to the repository so we can list them. Without either, they are enumerated from the running app, which can miss routes the interface never calls.
  • Test accounts for every role, two of each, plus accounts in a second organisation if the app is multi-tenant.
  • How the app is hosted: a managed platform, next start or standalone output on your own server, a custom server or a container, plus the host operating system and any CDN in front.
  • Your authentication provider, and where roles and organisation membership are stored.
  • A staging environment built from the same commit, hosting mode and configuration as production, since several advisories depend on how the app is built and hosted.
  • Your hosting provider's testing policy, and a technical contact who can restore data or pause testing.

What the report records for a Next.js application

The report keeps the structure of any Clever Ops web application test, with two additions for Next.js: a route inventory and your filled-in copy of the ledger.

If Clever Ops built or hosts your Next.js application, the work is a security review rather than an independent penetration test, and the report states who built and who hosts it. If a customer or auditor needs independence, choose a provider with no part in either.

  • A route inventory: each page, route handler and Server Action in scope, the roles it was tested as, and the result, so you can see what was covered as well as what failed.
  • The advisory ledger for your deployment, each row marked affected, not affected or not applicable, with the version, configuration and host evidence behind the mark.
  • Each finding with its request and response, secrets redacted, a fix written in Next.js terms such as moving a check from middleware into the data access layer, a CVSS v3.1 score and a business-risk rating.
  • Coverage mapped to the OWASP Web Security Testing Guide v4.2 and ASVS 5.0. The mapping describes what was checked; it does not certify the application.
  • After your fixes, a retest of the reported findings against the same requests, with each finding's status updated.

Frequently asked questions

No. The Next.js documentation recommends middleware, called proxy from Next.js 16, for optimistic checks and redirects, not as a full authorisation solution. Since March 2025 several advisories have let requests reach protected content without passing a middleware check. Keep middleware if it helps, and check authorisation again in the page, route handler, Server Action or data access layer.

Check the resolved next version in the deployed build and whether the app uses the App Router. App Router applications on 15.x and 16.x below the fixed release in their line are affected, as are canary releases from 14.3.0-canary.77, while 13.x, 14.x stable, Pages Router apps and the Edge Runtime are not. If the app was online and unpatched as of 4 December 2025 at 1:00 pm PT, the Next.js advisory recommends rotating its secrets. The December 2025 follow-up advisories need later releases still, which the ledger lists.

Providers use the words loosely, so ask what is included. An audit tends to mean a review of versions, configuration and code, while a penetration test sends requests to the running application as each role to prove what can be reached. For Next.js the two work best together: the version and configuration review fills in the advisory ledger, and signed-in testing works through the route matrix. Read-only code access added to a test covers cached functions and actions the interface never calls.

For some rows, yes. The CVE-2025-29927 advisory says deployments hosted on Vercel were automatically protected, and the CVE-2026-64649 advisory says managed hosting is not affected because it pins the Host header. Most other rows depend on the next version and your configuration wherever the app runs, and hosting has no bearing on whether your own Server Actions check the caller.

No. A test can run against the deployed application with test accounts. Read-only code access helps in three places: listing every Server Action and route handler, checking that cached functions receive the user or organisation as an argument, and finding secrets written into code. Without it, those parts are tested from the outside and the report says so.

It fixes the framework flaws named in the advisories, which is worth doing promptly. It does not fix application flaws such as a Server Action that skips its ownership check, a component that receives a whole database record, or a cache keyed without the user. Those need code changes, which is why the test covers your routes as well as your version.

Scope the right test for your application

Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.