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
PoC-for-Next.js-Middleware β€” > πŸ”“ Proof-of-Concept for a fictional Next.js middleware bypass (CVE-2025-29927) β€” craft sub-requests to test protected routes. | Kitploit
Tools/GitHubGitHub/m2hcz/poc-for-next.js-middleware
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubm2hcz/poc-for-next.js-middleware

PoC-for-Next.js-Middleware

> πŸ”“ Proof-of-Concept for a fictional Next.js middleware bypass (CVE-2025-29927) β€” craft sub-requests to test protected routes.

View Repository
1651 year 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

PoC for Next.js Middleware Bypass (CVE-2025-29927)

Python Version Status

This is a proof-of-concept for a fictional Next.js middleware bypass vulnerability (CVE-2025-29927). Use only for educational and authorized security research.


πŸš€ Features

FeatureDescription
✨ Color & VerboseColor-coded output; -v for detailed debug logs.
πŸ“¦ OOP StructureClass-based design for clarity and maintainability.
🌐 Proxy SupportRoute traffic through HTTP(S) proxies via --proxy.
πŸͺ Session HandlingPersistent requests.Session for cookies & connection reuse.
🚦 Redirect ControlNo-follow-redirect by default; clearly detects pass vs. fail.
πŸ›  Custom HeadersOverride User-Agent, x-middleware-subrequest, or add headers.

⚑ Installation

# Clone repository
git clone https://github.com/your-username/nextjs-middleware-poc.git
cd nextjs-middleware-poc

# (Optional) Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Requires Python 3.7+


🎯 Usage

python poc.py [options] <host>[:port]
OptionDescription
-p, --path PATHProtected route path (default: /admin)
-s, --scheme {http,https}Protocol (default: http)
--header HEADERx-middleware-subrequest header value (default: middleware:middleware)
-ua, --user-agent AGENTCustom User-Agent (default: Mozilla/5.0)
--proxy PROXYHTTP(S) proxy URL (e.g., http://127.0.0.1:8080)
-v, --verboseEnable debug output
-h, --helpShow this help message

πŸ” Examples

1. Basic Test

python poc.py localhost:3000

2. HTTPS & Custom Path

python poc.py example.com -s https -p /dashboard

3. Proxy & Verbose

python poc.py internal-app:8080 --proxy http://127.0.0.1:8080 -v

βœ… Expected Output

Success

[*] Target URL: http://localhost:3000/admin
[+] SUCCESS: Middleware bypassed β€” access granted!
--- Response Snippet ---
<!DOCTYPE html><html>…<title>Admin Panel</title>…

Failure

[*] Target URL: http://localhost:3000/admin
[-] FAIL: Access denied by middleware (302 Redirect)

Download Tool