Thursday, January 23, 2025
HomeCVE/vulnerabilityNext.js Vulnerability Let Attackers Bypass Authentication

Next.js Vulnerability Let Attackers Bypass Authentication

Published on

SIEM as a Service

Follow Us on Google News

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
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

GhostGPT – Jailbreaked ChatGPT that Creates Malware & Exploits

Artificial intelligence (AI) tools have revolutionized how we approach everyday tasks, but they also...

Tycoon 2FA Phishing Kit Using Specially Crafted Code to Evade Detection

The rapid evolution of Phishing-as-a-Service (PhaaS) platforms is reshaping the threat landscape, enabling attackers...

Nnice Ransomware Attacking Windows Systems With Advanced Encryption Techniques

CYFIRMA's Research and Advisory team has identified a new strain of ransomware labeled "Nnice,"...

Microsoft Unveils New Identity Secure Score Recommendations in General Availability

Microsoft has announced the general availability of 11 new Identity Secure Score recommendations in...

API Security Webinar

Free Webinar - DevSecOps Hacks

By embedding security into your CI/CD workflows, you can shift left, streamline your DevSecOps processes, and release secure applications faster—all while saving time and resources.

In this webinar, join Phani Deepak Akella ( VP of Marketing ) and Karthik Krishnamoorthy (CTO), Indusface as they explores best practices for integrating application security into your CI/CD workflows using tools like Jenkins and Jira.

Discussion points

Automate security scans as part of the CI/CD pipeline.
Get real-time, actionable insights into vulnerabilities.
Prioritize and track fixes directly in Jira, enhancing collaboration.
Reduce risks and costs by addressing vulnerabilities pre-production.

More like this

GhostGPT – Jailbreaked ChatGPT that Creates Malware & Exploits

Artificial intelligence (AI) tools have revolutionized how we approach everyday tasks, but they also...

Tycoon 2FA Phishing Kit Using Specially Crafted Code to Evade Detection

The rapid evolution of Phishing-as-a-Service (PhaaS) platforms is reshaping the threat landscape, enabling attackers...

Microsoft Unveils New Identity Secure Score Recommendations in General Availability

Microsoft has announced the general availability of 11 new Identity Secure Score recommendations in...