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

Goal: 1000 CNY · Raised: 1359 CNY

100%

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
CVE-2025-29927の検証
Readme
# CVE-2025-29927の検証用アプリ

[51回 初心者のためのセキュリティ勉強会](https://sfb.connpass.com/event/348181/)で本脆弱性についての紹介を行いました。
発表資料は[こちら](https://github.com/kuzushiki/CVE-2025-29927-test/blob/main/slide.pdf)です。

## 使用方法

以下のいずれかの方法でアプリにアクセスしてください。詳しい使い方はアプリのトップページに記載しています。

### 方法1. コンテナで試す(要Docker)

コンテナイメージを配布しているのでpullして実行してください。
```
docker run -p 3000:3000 my-container.sakuracr.jp/cve-2025-29927-test:1.1
```

本リポジトリをクローンしてコンテナをビルドすることもできます。
```
git clone git@github.com:kuzushiki/CVE-2025-29927-test.git
cd CVE-2025-29927-test
docker build . -t cve-2025-29927-test
docker run -p 3000:3000 cve-2025-29927-test
```

その後 http://localhost:3000/ にアクセスしてください。

### 方法2. URLにアクセスして試す

以下のURLからアクセスできます。さくらのクラウドのAppRunが無料で使える間はホストしておく予定です。
応答に時間がかかる場合があるので、気長にお待ちください。

https://app-e5e67cd8-f4e6-4f7c-b571-09b522207dd6.ingress.apprun.sakura.ne.jp/

### 方法3. ソースコードから実行(要npm)

本リポジトリをクローンしたあと、`npm i`および`npm run dev`を実行して起動します。
```
git clone git@github.com:kuzushiki/CVE-2025-29927-test.git
cd CVE-2025-29927-test
npm i
npm run dev
```

その後 http://localhost:3000/ にアクセスしてください。
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →