Новости компьютерной безопасности:

  Latest News

Critical Next.js Middleware Vulnerability Let Attackers Gain Unauthorized Access

С сайта: Vulnerability(cybersecuritynews.com)

Critical Next.js Middleware Vulnerability Let Attackers Gain Unauthorized Access

Author: Guru Baran

A critical security vulnerability (CVE-2025-29927) has been discovered in Next.js that allows attackers to completely bypass middleware-based security controls by manipulating the x-middleware-subrequest header.

This critical flaw affects authentication flows, authorization controls, path rewriting, and security header implementations across multiple Next.js versions, potentially exposing thousands of web applications to unauthorized access.

According to vulnerability researcher Rachid and Yasser Allam (inzo_), the vulnerability exploits a flaw in Next.js middleware that processes the x-middleware-subrequest header.

Next.js middleware serves as a crucial component for implementing authentication checks, path rewriting, server-side redirects, and security headers like Content Security Policy (CSP).

At its core, the vulnerability allows attackers to completely bypass middleware execution by manipulating the x-middleware-subrequest header value, which acts as a “universal key” enabling requests to bypass security checks entirely:

cyber security news
This code snippet shows that if the x-middleware-subrequest header value includes the middlewareInfo.name, middleware execution is bypassed via NextResponse.next().

Next.js Middleware Vulnerability
The exploitation method varies depending on the Next.js version:

For versions prior to 12.2:

cyber security news
For versions 12.2 and later:

cyber security news
For versions 13.2.0 and later:

cyber security news
For applications using a /src directory structure:

cyber security news
The impact is substantial as middleware is commonly used for critical security functions in Next.js applications. 

When exploited, attackers can access protected administrative interfaces, bypass authentication requirements, and even circumvent security headers like CSP.

The summary of the vulnerability is given below:

Risk Factors Details Affected ProductsNext.js 11.1.4 through 13.5.6 (unpatched)Next.js 14.x before 14.2.25Next.js 15.x before 15.2.3ImpactBypass of middleware-based security controlsUnauthorized accessExploit PrerequisitesSend HTTP requests with custom headersTarget application must be self-hosted and using Next.js middlewareCVSS 3.1 Score9.1 (Critical)
Affected Versions
The vulnerability affects:

  • Next.js 11.1.4 through 13.5.6 (unpatched)
  • Next.js 14.x before 14.2.25
  • Next.js 15.x before 15.2.3

Next.js deployments hosted on Vercel are automatically protected, but self-hosted applications remain vulnerable unless patched.

The vulnerability affects approximately 10 million weekly downloads of Next.js, potentially compromising security across numerous production systems in critical sectors, including banking and blockchain applications.

Researchers demonstrated practical attacks, including:

  • Authorization bypass – Accessing protected admin interfaces
  • Rewrite bypass – Reaching endpoints intended to be unreachable
  • CSP bypass – Circumventing content security policies
  • Cache-poisoning DoS – Potentially forcing caching of error pages, affecting availability

Mitigation Strategies
Vercel has released patches for the vulnerability:

  • For Next.js 15.x: Update to version 15.2.3 or higher
  • For Next.js 14.x: Update to version 14.2.25 or higher
  • For Next.js 13.x: Update to version 13.5.9 or higher

If immediate updating isn’t possible, implement these workarounds:

For Nginx:

cyber security news
For Express.js:

cyber security news
CVE-2025-29927 demonstrates how internal framework mechanisms can create significant security vulnerabilities. The ease of exploitation makes this a high-priority issue for Next.js users.

Organizations should immediately patch affected applications or implement header-blocking workarounds at the proxy level. 

This vulnerability reminds us that seemingly minor implementation details inweb frameworkscan lead to significant security exposures when they arenot properly validated against external manipulation.



#Cyber_Security #Cyber_Security_News #Vulnerability #cyber_security #cyber_security_news #vulnerability

Оригинальная версия на сайте: Critical Next.js Middleware Vulnerability Let Attackers Gain Unauthorized Access
Вернуться к списку новостей К свежим новостям Здесь был google AdSense.
Вместо рекламы товаров началась политическая агитация.
Отключено до получения извинений.

Вернуться к списку новостей Здесь был google AdSense.
Вместо рекламы товаров началась политическая агитация.
Отключено до получения извинений.


Новости проекта CSN:

✉ CSN.net4me.net

Обновление сайта csn.net4me.net

Обновление сайта csn.net4me.net 💻
cyber security news
  • Физически мы переехали на новый сервер. Благодарим наших подписчиков и постоянных читателей за терпение и понимание.
  • Сайт csn.net4me.net полностью адаптирован для работы по шифрованному SSL соединению.
  • Изменен механизм обработки и отображения опасных и критических уязвимостей.

Благодарим что вы с нами.


#CSN_обновление_сайта
https://csn.net4me.net/cyber_security_8301.html

Дополнительный материал

О проекте CSN

Проект CSN.net4me.net родился 16 Марта 2018 года.
Проект находится в самом начале своего развития. Конечно оформление, наполнение будет меняться. Одно останется неизменным - самые свежие новости компьютерной и сетевой безопасности.

О проекте net4me

Проект net4me.net развивался как сборник готовых решений и документации по темам компьютерной безопасности, сетевых решений и СПО (в часности linux). Темпы развития IT отрасли оказались столь быстрыми, что некоторые знания, технологии и информация о них устаревали мгновенно. Тем не менее, некоторый материал net4me.net до сих пор востребован.

Об источниках

Новости берутся CSN из открытых и доступных каждому источников. Авторы проекта стараются подбирать авторитетные и проверенные источники. Но, тем не менее, не несут ответственности за содержимое новостей. В каждой новости указывается источник этой новости, её автор и ссылка на оригинал новости.

Информация

Если вы желаете чтобы новости вашего ресурса были размещены на сайте CSN, то свяжитесь с авторами проекта csn@net4me.net и предложите ссылку на rss или xml ленту новостей вашего ресурса. Любая предложенная информация будет рассмотрена редакцией.