Next.js Penetration Testing

Next.js Penetration Testing for App Router and Server Actions

Next.js moves half the application back to the server, and the authorisation model moves with it. We test the middleware, the server actions and the cache, not just the pages. CREST-certified testers, fixed price from £2,720, scoped in 24 hours.

  • Unlimited retesting
  • No rescheduling or cancellation fees
  • Fixed quote within 24 hours
Accredited & recognised
Cyber Essentials certified Cyber Essentials Plus certified IASME certifying body ISO 27001 certified ISO 9001 certified Crown Commercial Service supplier UK Cyber Security Council member
CREST Member
Verified accreditation
10
Next.js-specific test areas
FREE Retest
Until the finding is closed
24h
Scope to active testing
CLIENT REFERENCE
“I would highly recommend EJN Labs to any organisation seeking reliable, detailed, and well-managed penetration testing services, particularly for government or enterprise-level projects.”
SquareOneImran SaghirProject Lead, SquareOne
CLIENT REFERENCE
“There wasn’t another company we could find that could deliver what we needed in the timeframe we needed. The client loved it, and we got instant ROI from the engagement.”
CelloriDan WilcocksonCo-Founder, Cellori
WHY IT MATTERS
1 header

Middleware is where many teams put their authentication gate, because it runs before every route. That makes it a single point of failure, and the 2025 bypass class showed what happens when a request can persuade the framework to skip it. We test whether any route depends on middleware alone, and what is reachable when middleware is out of the picture.

In Next.js, the boundary moved and the checks did not always move with it

Server actions are the second area. They look like ordinary functions in the codebase, but they compile into callable endpoints, and anyone can call them with arguments of their choosing. We enumerate them from the build output and exercise each one directly, with each role and with no role at all.

Then the cache. Next.js caches aggressively across requests and users, so the interesting question is whether a response built for one account can be served to another, and whether draft or preview modes let an anonymous visitor read unpublished content.

ISO 27001, SOC 2, PCI DSS and Cyber Essentials Plus audits accept manual penetration test evidence. Scan-only evidence is generally insufficient.

NEXT.JS SPECIFICS

What We Actually Test in a Next.js Application

Ten test areas that apply because the application is Next.js, on top of the standard application checks. Every finding is verified, reproducible and mapped to OWASP, CWE and CVSS 3.1.

NXT-01

Middleware authorisation

Whether authorisation lives only in middleware, and what a request that skips or confuses middleware can reach.

NXT-02

Server actions

Actions enumerated from the build output and called directly, with tampered arguments, missing role checks and replay.

NXT-03

Route handlers and API routes

Object level authorisation, mass assignment, method confusion and undocumented handlers.

NXT-04

Caching and revalidation

Responses cached across users, stale authorisation decisions, and the boundary between static and dynamic rendering.

NXT-05

Image optimisation

Remote patterns configuration and whether the optimiser can be pointed at internal hosts or cloud metadata.

NXT-06

Environment and secrets

Server-only values that reach the client bundle, public prefixed variables, and what the build output discloses.

NXT-07

Server and client components

Data passed across the boundary, serialised fields that were never meant to leave the server, and props that carry more than the UI shows.

NXT-08

Draft and preview modes

Preview tokens, cookie handling, and whether unpublished content is reachable without them.

NXT-09

Rewrites, redirects and headers

Open redirects, host header handling, and the security headers the framework does not set for you.

NXT-10

Deployment surface

Source maps, standalone output, build manifests, and the hosting platform configuration around the app.

METHODOLOGY

SAMPLE FINDING

What a Next.js finding looks like

Written the way a finding appears in our reports. The example below is reconstructed from publicly documented research, with hosts, paths and identifiers redacted. We do not republish client findings, named or anonymised.

CriticalCVSS 9.1 · CWE-285 · Illustrative example

Middleware authorisation bypassed with a single request header

Affected
Every route behind the middleware file on a self hosted Next.js application at [redacted].
What we found
Authentication and role checks ran only in middleware. Adding the framework internal subrequest header to a request caused middleware to be skipped entirely, and the administrative routes returned data to a client with no session at all.
Why it matters
Complete authorisation bypass on every protected route, with no credentials, no user interaction and nothing unusual in the application logs.
Fix
Upgrade to a patched Next.js release, strip the internal header at the reverse proxy or CDN, and repeat the authorisation check inside each route handler so middleware is a convenience rather than the only control.

Reconstructed from public research: CVE-2025-29927, Next.js middleware authorisation bypass via the x-middleware-subrequest header, CVSS 3.1 base score 9.1.

Next.js Penetration Testing: From Scope to Attestation

CREST-aligned methodology built on OWASP Web Security Testing Guide, OWASP ASVS, NIST SP 800-115, and PTES. Each finding maps to all four standards plus your specific compliance regime.

01

Reconnaissance

Application mapping, technology fingerprinting, content discovery, parameter enumeration, authentication-flow analysis, role-matrix construction.

02

Vulnerability Assessment

Authenticated and unauthenticated automated scanning across every user role, plus targeted manual checks for known weakness patterns.

03

Manual Exploitation

Hands-on testing by a CREST-certified pentester. Business-logic exploitation, chained vulnerabilities, privilege escalation, impact validation.

04

Reporting + Retest

Executive summary, technical report with CVSS scores and reproduction steps, walkthrough call, free retest after remediation, attestation letter.

CREDENTIALS

Verified Accreditations Auditors Accept

Every credential below is independently verifiable. UK procurement teams, FCA supervisors, ISO 27001 / SOC 2 auditors, and cyber insurance underwriters all recognise these standards.

GET YOUR QUOTE

Get a CREST Next.js application pen test quote in 24 hours

A fixed-price quote back in one business day, from a named CREST assessor. No sales pipeline, no chasing.

  • CREST and IASME accredited. Testing your auditors and clients already recognise.
  • Fast-track testing within 24 hours where required. Free retest of every fix included.
  • Live findings via your client portal, not a four-week PDF.
  • Fixed price from £2,720 for a small, single-scope engagement, agreed up front. Most engagements run £3,960 and up. No day-rate surprises.
What clients say
There wasn’t another company we could find that could deliver what we needed in the timeframe we needed. The client loved it, and we got instant ROI from the engagement.
CelloriDan WilcocksonCo-Founder, Cellori

Under NDA Further named references available on a scoping call.

What happens next
  1. We reply within one business day with a fixed-price quote from a named CREST assessor.
  2. You approve the scope and we book a start date, usually within 24 hours.
  3. Live findings land in your client portal as we test, with a free retest of every fix.
Accredited & recognised
CREST member Cyber Essentials certified Cyber Essentials Plus certified IASME certifying body ISO 27001 certified ISO 9001 certified UK Cyber Security Council Crown Commercial Service supplier

Get your fixed pen test quote in 24 hours

24h reply CREST tester Free retests

or book a 20-min scoping call first

We reply within one business day. Your data stays with us. No newsletter signup.

COMPLIANCE READY

Reports Mapped to Every Framework

Findings are explicitly tagged to the relevant control reference. Your audit team submits the report directly without translation work.

ISO 27001:2022

Annex A.8.8 management of technical vulnerabilities plus A.5.15-5.18 and A.8.2-8.5 access control validation.

SOC 2 Type I & II

CC6 logical access, CC7 system operations, CC8 change management evidence.

PCI DSS

Requirement 11.4 application penetration testing across cardholder data environments, including ecommerce penetration testing for online retail platforms.

FCA SYSC

SYSC 4.1.1R, 6.1.1R, 13 mapped to each finding for FCA-regulated firms.

UK GDPR

Article 32 effectiveness testing, customer-data security controls, ICO-acceptable evidence.

Cyber Essentials Plus

Direct certification through our IASME body status, single-vendor delivery.

PRICING

Transparent Next.js Penetration Testing Pricing

Pricing depends on app complexity, user-role count, business-logic depth, and integration surface. The day count flexes; the included deliverables stay the same across all engagements.

✦ ALWAYS · ON EVERY TIER · NO EXCEPTIONS ✦
Free retests, no time limit
Free rescheduling
No cancellation fees
24-hour scope to active testing
Live findings to client portal
Executive + technical report
60-min walkthrough call
Letter of attestation
SMALL / SMB
£2,720–£3,960
2 to 3 days

Single user role, basic CRUD application, marketing website with auth. Typically 5-day engagement.

Get a fixed quote
ENTERPRISE
£6,380–£9,620
5 to 7 days

Multi-tenant platform, complex authorisation matrix, integration-heavy applications. 15-20 day engagement.

Get a fixed quote

Part of Technologies We Pen Test. These are examples of the stacks we publish pages for, not a complete list. If yours is not here we still test it. Related pages:

Full UK pen test cost guide

WHY EJN LABS

What You Get From Next.js Penetration Testing

Six concrete differentiators competitors don’t all match.

CREST-Certified Testers, Verifiable

Every test by a CREST-certified pen tester (CRT, CCT APP, CCT INF where applicable). Verify our company status at crest-approved.org.

24-Hour Startup, Where Required

From signed scope to active testing in a single business day for incident response, audit deadlines, or regulator-driven timelines.

Live Findings, Not 4-Week PDFs

Critical issues reported during testing through your client portal. Your team remediates while testing continues.

Audit-Ready Reports

Executive summary plus full technical report with CVSS scores and explicit framework mappings (ISO 27001, SOC 2, PCI DSS, FCA SYSC).

Free Retests, Standard

Verify remediation of every finding before close-out. Letter of attestation for audit submission included. Most competitors charge £1,500-£3,000 per retest.

UK-Based CREST Testers

Every engagement performed by vetted, UK-based CREST-certified testers, matched to your needs, security clearance, and compliance scope.

FAQ

Frequently Asked

Do you test the App Router and the Pages Router?

Both. The App Router brings server actions and the newer caching model, the Pages Router brings API routes and getServerSideProps. The checks differ and we run whichever applies.

Is this different from your React page?

Yes. React is tested as a browser application against its API. Next.js runs code on the server, so middleware, server actions and caching come into scope.

Do you need our repository?

No. We enumerate server actions and routes from the deployed build. Source access speeds up triage but is not required.

We are on Vercel. Does that change the test?

It changes the deployment surface, not the application checks. We include the platform configuration that is visible from outside.

Can you test incremental static regeneration?

Yes, and it is worth doing. Regeneration is where cached pages and authorisation decisions most often fall out of step.

What about the API behind Next.js?

If a separate service sits behind it, we scope that too, using the checks from the relevant technology page.

What is included in the price?

Scoping, testing, the executive summary, the technical report, a walkthrough call and free retests until the finding is closed. One scope, one number, no follow-up invoices.

How fast can you start?

Scope to active testing in 24 hours once the scope is agreed, subject to tester availability in your window.

Are your testers CREST certified?

Yes. EJN Labs is a CREST member company and testing is delivered by CREST-qualified testers. The membership is verifiable on the CREST marketplace.

EXPLORE EVERY SERVICE

20+ CREST-accredited testing services in one place

Web, mobile, API, cloud, AI, infrastructure, red team. Pick the test that fits your environment.

Penetration testing services
READY TO START

Get your Next.js application tested properly

Send us the URL and the roles. You will have a fixed scope and a number within 24 hours.