Skip to content
OpenAdvisories
Critical · 9.1 Scanner template Public exploit CVE-2025-29927 EUVD-2025-7243GHSA-f82v-jwr5-mffw

Authorization Bypass in Next.js Middleware

Published Mar 21, 2025 · Updated Apr 8, 2025 · Assigned by GitHub_M

Description

Next.js is a React framework for building full-stack web applications. Starting in version 1.11.4 and prior to versions 12.3.5, 13.5.9, 14.2.25, and 15.2.3, it is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware. If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application. This vulnerability is fixed in 12.3.5, 13.5.9, 14.2.25, and 15.2.3.

Affected products

VendorProductAffectedFixed
vercel next.js >= 11.1.4, < 12.3.5, >= 14.0.0, < 14.2.25, >= 15.0.0, < 15.2.3, >= 13.0.0, < 13.5.9 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling jitsucom-jitsu +2 2.9.0-r0 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 133 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
npm next >= 13.0.0, < 13.5.9 13.5.9 GHSA-f82v-jwr5-mffw
npm next >= 14.0.0, < 14.2.25 14.2.25 GHSA-f82v-jwr5-mffw
npm next >= 15.0.0, < 15.2.3 15.2.3 GHSA-f82v-jwr5-mffw
npm next >= 12.0.0, < 12.3.5 12.3.5 GHSA-f82v-jwr5-mffw

Advisories 2

References