Cyber Security News

Next.js Vulnerability Let Attackers Bypass Authentication

A high-severity vulnerability has been discovered in the popular web framework, Next.js, which allows attackers to bypass authentication under specific circumstances.

The issue, cataloged as CVE-2024-51479, affects versions from 9.5.5 up to 14.2.14. Developers using these versions must quickly upgrade to the patched version 14.2.15 to secure their applications.

Authorization Bypass in Next.js ( CVE-2024-51479)

The vulnerability stems from a flaw in how Next.js handles authorization checks in middleware based on pathname rules.

If an application relies on pathname-based middleware to enforce access control, it may inadvertently expose certain routes to unauthorized access.

Free Webinar on Best Practices for API vulnerability & Penetration Testing:  Free Registration

Specifically, routes directly under the application’s root directory are vulnerable to bypass.

For instance, while the root path such as https://example.com/ remains unaffected, a route like https://example.com/foo could be exploited, whereas deeper nested routes like https://example.com/foo/bar are not impacted.

This vulnerability poses a significant risk for applications that manage sensitive data or services on affected routes.

Exploitation does not require user interaction, credentials, or elevated privileges, making it an attractive target for attackers operating over a network.

The vulnerability is rated as high severity, with a CVSS v3 score of 7.5. Exploiting the vulnerability compromises confidentiality, with unauthorized access to data being the primary concern.

However, it does not affect the integrity or availability of the application. The attack complexity is low, further amplifying the risk, as it requires no special privileges or user interaction to execute.

Patches and Mitigation

The Next.js team has addressed the issue in version 14.2.15. Updating to this version eliminates the vulnerability by ensuring proper authorization checks for all routes, including those directly under the root directory.

For applications hosted on Vercel, this vulnerability has already been mitigated automatically, irrespective of the Next.js version being used.

However, developers running self-hosted or custom deployments should urgently update their projects to the patched version to prevent exploitation.

No official workarounds are available for this vulnerability. The most effective action is to immediately update to Next.js version 14.2.15 or later.

Developers are also encouraged to review their middleware and route protection strategies to ensure robust security measures are in place.

Security audits and monitoring of access logs can help detect any unauthorized activity, particularly for routes that may have been previously exposed.

The vulnerability was responsibly disclosed by tyage, a security researcher from GMO CyberSecurity by IERAE. The Next.js team has expressed its gratitude for the timely and responsible reporting of this issue.

Further details are available in the official advisories published by the Next.js team, highlighting their commitment to maintaining a secure development environment.

Investigate Real-World Malicious Links, Malware & Phishing Attacks With ANY.RUN – Try for Free

Divya

Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Recent Posts

Hackers Easily Bypass Active Directory Group Policy to Allow Vulnerable NTLMv1 Auth Protocol

Researchers have discovered a critical flaw in Active Directory’s NTLMv1 mitigation strategy, where misconfigured on-premises…

1 day ago

AWS Warns of Multiple Vulnerabilities in Amazon WorkSpaces, Amazon AppStream 2.0, & Amazon DCV

Amazon Web Services (AWS) has issued a critical security advisory highlighting vulnerabilities in specific versions…

2 days ago

FlowerStorm PaaS Platform Attacking Microsoft Users With Fake Login Pages

Rockstar2FA is a PaaS kit that mimics the legitimate credential-request behavior of cloud/SaaS platforms. Phishing…

2 days ago

New Tool Unveiled to Scan Hacking Content on Telegram

A Russian software developer, aided by the National Technology Initiative, has introduced a groundbreaking AI…

2 days ago

PoC Exploit Released for Ivanti Connect Secure RCE Vulnerability

A serious security flaw has been identified in Ivanti Connect Secure, designated as CVE-2025-0282, which enables…

2 days ago

Let’s Encrypt Unveils Six-Day Certificate and IP Address Options for 2025

Let’s Encrypt has announced plans to introduce six-day certificate options and support for IP address…

2 days ago