Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-29927 PoC — Authorization Bypass in Next.js Middleware

Source
Associated Vulnerability
Title:Authorization Bypass in Next.js Middleware (CVE-2025-29927)
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.
Description
Next.js CVE-2025-29927 Hunter
Readme
## About
A simple Python tool that automates Shodan searches and filters target IPs/domains to identify assets potentially vulnerable to CVE-2025-29927 in Next.js deployments.

## Usage
Extract both IPs and domains
```
python3 nextjs-CVE-2025-29927-hunter.py -t target.com
```

Only extract domains
```
python3 nextjs-CVE-2025-29927-hunter.py -t target.com -dom
```

Only extract IPs
```
python3 nextjs-CVE-2025-29927-hunter.py -t target.com -ip
```


## Screenshot
![Image](https://github.com/user-attachments/assets/33711a3f-575a-4157-b957-0e9a0e1260a9)


## Installation
```
git clone https://github.com/darklotuskdb/nextjs-CVE-2025-29927-hunter.git && cd nextjs-CVE-2025-29927-hunter && chmod +x *.py && chmod +x *.sh 
```

```
./install.sh
```

## References
* [Next.js and the corrupt middleware: the authorizing artifact](https://zhero-web-sec.github.io/research-and-things/nextjs-and-the-corrupt-middleware)
* [Doing the Due Diligence: Analyzing the Next.js Middleware Bypass (CVE-2025-29927)](https://www.assetnote.io/resources/research/doing-the-due-diligence-analyzing-the-next-js-middleware-bypass-cve-2025-29927)
* [I Scanned 100,000+ Subdomains For CVE-2025-29927](https://www.youtube.com/watch?v=7hqBePL0C_I)


## Support me?
[BuyMeACoffee](https://www.buymeacoffee.com/darklotus) If you like my work <3

## About Me

* **DarkLotus** - *CyberSecurity Researcher* - [DarkLotusKDB](https://github.com/darklotuskdb)

### Social Media Handles
* [Twitter](https://twitter.com/darklotuskdb)
* [Medium](https://darklotus.medium.com/)
* [Linkedin](https://www.linkedin.com/in/kamaldeepbhati/)
* [Instagram](https://www.instagram.com/kamaldeepbhati/)
File Snapshot

[4.0K] /data/pocs/0ba5477af0bbfae34ebdb9348e4e23a646e169a2 ├── [1.3K] install.sh ├── [ 34K] LICENSE ├── [3.8K] nextjs-CVE-2025-29927-hunter.py └── [1.6K] README.md 0 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →