{"uuid": "862421b2-f6dd-475c-8823-72b5ba2b6346", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "2a075640-a300-48a4-bb44-bc6130783b9b", "vulnerability": "CVE-2025-29927", "type": "published-proof-of-concept", "source": "https://t.me/offensiverescuerangers/11", "content": "\u2194\ufe0f Next.js \u0438 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0451\u043d\u043d\u044b\u0439 middleware\n\n\u0420\u0430\u0441\u043a\u0440\u044b\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043d\u043e\u0432\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 Next.JS CVE-2025-29927. \u0423\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Next.js \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 11.1.4. \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 x-middleware-subrequest, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c middleware, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0443\u0442\u0435\u0439.\n\n\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\n\nNext.js \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 x-middleware-subrequest \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043d\u0443\u0436\u0434: \u043e\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 middleware \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0441\u0430\u043c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435, \u0447\u0442\u043e middleware \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.\nx-middleware-subrequest: middleware:middleware:middleware:middleware:middleware\nx-middleware-subrequest: src/middleware:src/middleware:src/middleware:src/middleware:src/middleware\n\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:\nGET /admin/dashboard HTTP/1.1\nHost: vulnerable.site\nx-middleware-subrequest: middleware:middleware:middleware:middleware:middleware\n\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: Middleware \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d.\n\n\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0442\u0430\u043a\n\n\ud83d\udd39CSP bypass\n\u0415\u0441\u043b\u0438 middleware \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 Content-Security-Policy \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 - \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b.\n\n\ud83d\udd39DoS \u0447\u0435\u0440\u0435\u0437 Cache Poisoning\n\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0441\u0430\u0439\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 rewrite \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \"\u043f\u0443\u0441\u0442\u0443\u044e\" \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043d\u0430\u0440\u0443\u0448\u0438\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445.\n\n\u041a\u043e\u0433\u043e \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f\n\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 middleware \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0415\u0441\u043b\u0438 middleware \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f - \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u043b\u043e\u0437\u043d\u0430\u0447\u0438\u043c\u0430 (\u043a\u0440\u043e\u043c\u0435 DoS-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432).\n\n\ud83d\udcd6 \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\nhttps://zhero-web-sec.github.io/research-and-things/nextjs-and-the-corrupt-middleware\n\n#web #bac #cache #dos #csp", "creation_timestamp": "2025-04-01T07:16:32.000000Z"}