Thursday, December 19, 2024
HomeCVE/vulnerabilityNext.js Vulnerability Let Attackers Bypass Authentication

Next.js Vulnerability Let Attackers Bypass Authentication

Published on

SIEM as a Service

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.

- Advertisement - SIEM as a Service

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

Beware Of Malicious SharePoint Notifications That Delivers Xloader Malware

Through the use of XLoader and impersonating SharePoint notifications, researchers were able to identify...

Malicious Supply Chain Attacking Moving From npm Community To VSCode Marketplace

Researchers have identified a rise in malicious activity on the VSCode Marketplace, highlighting the...

Hackers Weaponizing LNK Files To Create Scheduled Task And Deliver Malware Payload

TA397, also known as Bitter, targeted a Turkish defense organization with a spearphishing email...

BADBOX Botnet Hacked 74,000 Android Devices With Customizable Remote Codes

BADBOX is a cybercriminal operation infecting Android devices like TV boxes and smartphones with...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Beware Of Malicious SharePoint Notifications That Delivers Xloader Malware

Through the use of XLoader and impersonating SharePoint notifications, researchers were able to identify...

Malicious Supply Chain Attacking Moving From npm Community To VSCode Marketplace

Researchers have identified a rise in malicious activity on the VSCode Marketplace, highlighting the...

Hackers Weaponizing LNK Files To Create Scheduled Task And Deliver Malware Payload

TA397, also known as Bitter, targeted a Turkish defense organization with a spearphishing email...