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__Next.js — CVE-2025-29927 - Next.js漏洞测试工具 | Kitploit
Tools/GitHubGitHub/hujiaozhuzhu/cve-2025-29927__next.js
Vulnerability ScannersExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubhujiaozhuzhu/cve-2025-29927__next.js

CVE-2025-29927__Next.js

CVE-2025-29927 - Next.js漏洞测试工具

View Repository
14 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 Authorization Bypass POC

⚠️ Legal Disclaimer: This tool is intended for security research, authorized penetration testing, and educational purposes only. Using this tool against target systems without explicit permission is illegal and unethical.

📋 Overview

CVE-2025-29927 is a critical security vulnerability in Next.js that allows attackers to bypass middleware-based authorization controls by exploiting improper handling of the x-middleware-subrequest header.

🎯 Vulnerability Details

PropertyValue
CVE IDCVE-2025-29927
CVSS Score9.8 (Critical)
Affected VersionsNext.js 13.4.0 - 15.2.3
Fixed VersionsNext.js 14.2.25+, 15.2.3+
Discovery DateMarch 21, 2025
Vulnerability TypeAuthorization Bypass

🔍 Technical Details

Root Cause: Next.js middleware mishandles the x-middleware-subrequest header, treating requests with this header as internal trusted sub-requests, thereby bypassing authorization checks.

Impact: Attackers can access protected routes (e.g., /admin, /api/sensitive) without authentication.

🚀 Features

  • ✅ Single-file Python exploitation tool
  • ✅ Automated vulnerability detection
  • ✅ Batch scanning support
  • ✅ Docker-based vulnerable environment
  • ✅ Detailed logging and output
  • ✅ No external dependencies (only requests)

📦 Installation

root@kitploit:~
# Clone the repository
git clone https://github.com/hujiaozhuzhu/CVE-2025-29927-POC.git
cd CVE-2025-29927-POC

# Install dependencies
pip install -r requirements.txt

🎯 Usage

Quick Start (Exploit a Single Target)

root@kitploit:~
python exploit/cve_2025_29927.py -u http://127.0.0.1:3000

Advanced Options

root@kitploit:~
# Custom admin path
python exploit/cve_2025_29927.py -u http://target.com -p /admin

# Verbose output
python exploit/cve_2025_29927.py -u http://target.com -v

# Save results to a file
python exploit/cve_2025_29927.py -u http://target.com -o results.txt

Batch Scanning

root@kitploit:~
# Scan multiple targets from a file
python exploit/batch_scanner.py -f targets.txt

# Scan an IP range
python exploit/batch_scanner.py --range 192.168.1.0-255

🏗️ Setup Vulnerable Environment

Using Docker (Recommended)

root@kitploit:~
cd target
docker-compose up -d

Access the vulnerable application: http://localhost:3000

Manual Setup

root@kitploit:~
cd target
npm install
npm run dev

📊 Vulnerability Detection Flow

  1. Normal Request: Send a GET request without the exploit header

    • Expected: 302/401/403 (blocked by middleware)
  2. Exploit Request: Send a GET request with x-middleware-subrequest: 1

    • Expected: 200 (bypasses middleware)
    • Success: Response contains admin content

🛡️ Mitigation & Defense

Immediate Actions

  1. Upgrade Next.js

    root@kitploit:~
    npm install next@latest
    # or
    npm install [email protected]
    
  2. Block Vulnerable Header in Reverse Proxy

    root@kitploit:~
    location / {
      deny x-middleware-subrequest;
      # ... rest of configuration
    }
    

Long-Term Recommendations

  • Implement defense in depth (multi-layer authentication)
  • Regular security audits
  • Keep dependencies up to date
  • Use a Web Application Firewall (WAF)

📚 Documentation

  • Vulnerability Analysis
  • Usage Guide
  • Defense & Remediation

🧪 Testing

Manual Testing

root@kitploit:~
# Run vulnerability test
python exploit/cve_2025_29927.py -u http://localhost:3000 -t

Automated Testing

root@kitploit:~
# Run test suite
python tests/test_exploit.py

🔬 Research References

  • NVD Entry
  • Next.js Security Advisory
  • Technical Analysis

📝 Changelog

v1.0.0 (2025-04-02)

  • Initial release
  • Single target exploitation
  • Batch scanning support
  • Docker vulnerable environment
  • Comprehensive documentation

👥 Contributors

  • [Your Name] - Initial implementation

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Legal Disclaimer

Important: This tool is intended for educational and authorized security testing purposes only.

  • Only use on systems you own or have explicit permission to test
  • Unauthorized access to computer systems is illegal
  • Report vulnerabilities responsibly to vendors
  • Follow responsible disclosure guidelines

By using this tool, you agree to:

  • Comply with all applicable laws and regulations
  • Use only for authorized security testing
  • Report discovered vulnerabilities responsibly
  • Not use for malicious purposes

📞 Reporting Vulnerabilities

If you find issues with this tool or discover new vulnerabilities, please report responsibly:

  1. Contact the vendor (Vercel/Next.js team)
  2. Follow responsible disclosure guidelines
  3. Consider joining a bug bounty program

🙏 Acknowledgments

  • Vercel/Next.js team for timely disclosure and fix
  • Security research community for analysis and testing
  • Vulnerability discoverer

Remember: Security research should always be ethical and legal. Use your skills to make the internet safer! 🛡️

Download Tool