Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-29927-NextJs-Middleware-Simulation — Simulates CVE-2025-29927, a critical Next.js vulnerability allowing attackers to bypass middleware authorization by exploiting the internal x-middleware-subrequest HTTP header. Demonstrates unauthorized access to protected routes and provides mitigation strategies. | Kitploit
Tools/GitHubGitHub/knotsecurity/cve-2025-29927-nextjs-middleware-simulation
Vulnerability AnalysisWeb Application ExploitationWeb SecurityPenetration TestingMisconfigurationLearning & Education
GitHubknotsecurity/cve-2025-29927-nextjs-middleware-simulation

CVE-2025-29927-NextJs-Middleware-Simulation

Simulates CVE-2025-29927, a critical Next.js vulnerability allowing attackers to bypass middleware authorization by exploiting the internal x-middleware-subrequest HTTP header. Demonstrates unauthorized access to protected routes and provides mitigation strategies.

View Repository
361 year agoNot yet reviewed
Share

CVE-2025-29927: Next.js Middleware Authorization Bypass Simulation

This repository demonstrates the exploitation of CVE-2025-29927, a critical vulnerability in Next.js that allows attackers to bypass middleware-based authorization checks. The flaw stems from improper handling of the internal x-middleware-subrequest HTTP header, enabling unauthorized access to protected routes.

⚠️ Disclaimer

This project is intended for educational and research purposes only. Unauthorized use against systems without explicit permission is illegal and unethical. The authors are not responsible for any misuse of this code.

📚 Background

CVE-2025-29927 affects Next.js versions prior to:

  • 12.3.5
  • 13.5.9
  • 14.2.25
  • 15.2.3

The vulnerability arises when an attacker includes the x-middleware-subrequest header in an HTTP request. Next.js interprets this header as an internal subrequest, causing it to skip middleware execution, including critical authorization checks.

🧪 Simulation Setup

Prerequisites

  • Node.js (v14 or later)
  • npm

Installation

  1. Clone the repository:
    git clone https://github.com/Knotsecurity/CVE-2025-29927-NextJs-Middleware-Simulation.git
    cd cve-2025-29927-simulation
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev
    

🔍 Vulnerability Demonstration

Protected Route

The application includes a protected route at /admin, which is guarded by middleware that checks for user authentication.

Exploitation Steps

  1. Access the /login page and log in with [email protected]:password123.
  2. Try to access the /admin page. You will get an unauthorized access error.
  3. Capture this request in Burp Suite and add the header x-middleware-subrequest: middleware, then send the request.
  4. You will observe that you now have access to the /admin page.

🛡️ Mitigation

To protect against this vulnerability:

  1. Upgrade Next.js to a patched version:
    npm install next@latest
  2. Filter Requests: Configure your server or proxy to reject requests containing the x-middleware-subrequest header.
  3. Redundant Checks: Implement authorization checks within your route handlers, not solely in middleware.

📄 References

  • Next.js Security Advisory
  • Akamai Blog on CVE-2025-29927
  • Datadog Analysis

🧑‍💻 Author

Saikiran B

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    930
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    554
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    354
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    349
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →