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
This repository contains **research and analysis** related to CVE-2025-29927.   It demonstrates safe, controlled testing approaches for a path traversal/middleware misconfiguration vulnerability in web applications.
Readme
# CVE-2025-29927 Research and Safe Testing Framework

This repository contains **research and analysis** related to CVE-2025-29927.  
It demonstrates safe, controlled testing approaches for a path traversal/middleware misconfiguration vulnerability in web applications.

> ⚠️ **Important:** This repository is for educational purposes only. Do **not** target any system without explicit permission.

## Overview

CVE-2025-29927 involves a vulnerability in middleware handling, which can lead to unauthorized file access if improperly configured.  

This repository documents:

- Analysis of the vulnerability
- Safe testing scripts for isolated lab environments
- Recommendations and mitigation strategies

## Safe Testing

All PoC scripts are intended to run **against local or lab environments only**. They:

1. Send requests to a test server
2. Compare baseline and modified responses
3. Flag potential vulnerability patterns **without leaking sensitive data**

## Example Usage (Lab Only)

```bash
python3 PoC.py
```
You will be prompted for a target URL, which should be a controlled environment. The script outputs:

HTTP status codes

Basic response differences

A "vulnerable" flag for educational purposes

Recommendations
If running a real application:

Avoid using unvalidated headers for sensitive operations

Restrict filesystem access in server middleware

Apply all vendor security updates

Disclaimer
This project is purely educational. Using this code against any system you do not own or have explicit permission to test is illegal.
File Snapshot

[4.0K] /data/pocs/56ec912d8f0ea3aa06edf5e12c049965dc821ef1 ├── [1.2K] PoC.py └── [1.5K] README.md 0 directories, 2 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 →