Vulnerability News

Next.js Authorization Bypass Vulnerability Exposes Root-Level Pages

A critical security vulnerability tracked as CVE-2024-51479 has been identified in Next.js, a widely used React framework for building web applications.

The flaw allowed unauthorized access to certain pages directly under the application’s root directory, bypassing middleware-based authorization checks. This issue has raised significant concerns due to Next.js’ extensive adoption by developers and organizations worldwide.

The vulnerability affected Next.js versions 9.5.5 through 14.2.14. It stemmed from how middleware authorization was implemented based on the pathname of requests.

Specifically, pages located directly under the root directory (e.g., `https://example.com/foo`) were vulnerable, while the root itself (`https://example.com/`) and nested paths (`https://example.com/foo/bar`) remained unaffected.

This bypass could have enabled attackers to gain unauthorized access to sensitive application data or functionality if proper authorization mechanisms had not been implemented elsewhere in the application.

The vulnerability was assigned a CVSS score of 7.5, indicating high severity. Given the widespread use of Next.js in enterprise and consumer-facing applications, this flaw posed a significant risk to user data and business operations.

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

Organizations relying on middleware for authorization checks were particularly vulnerable if they had not updated their applications.

The Next.js team promptly addressed the issue by releasing a patch in version 14.2.15 and later. Developers are strongly advised to upgrade their applications to this version or newer to eliminate the risk of exploitation.

For applications hosted on Vercel, the platform that created Next.js, the vulnerability has been automatically mitigated through proactive measures implemented by Vercel’s firewall.

This ensures that even applications running older versions of Next.js are protected against this specific flaw.

Unfortunately, this vulnerability has no official workarounds apart from upgrading to a patched version of Next.js. Developers must prioritize updating their dependencies to secure their applications effectively.

To protect against potential exploitation:

  • Update your Next.js application to version 14.2.15 or later immediately.
  • If hosting on Vercel, verify that your deployment benefits from their automatic mitigation.
  • Review your application’s authorization logic to ensure robust security measures beyond middleware checks.

This incident underscores the importance of staying vigilant about security updates and regularly auditing application dependencies for vulnerabilities.

By addressing such issues promptly, developers can safeguard their applications and users from potential threats.

Cyber Advisory

CISO Advisory is a Team of Security Experts Covering Various Cybersecurity Research and Technical Write-ups.

Recent Posts

Hackers Target AI Infrastructure With RCE, Prompt Injection and API Key Theft

Hackers are actively probing AI systems, turning exposed gateways and agent tools into routes for…

5 hours ago

Hackers Make Phishing Pages Change Their Code Every Time Someone Opens Them

Hackers are making some phishing pages harder to track by changing the code delivered to…

5 hours ago

Iran-Linked Hackers Reportedly Knock UK Power Plant Offline for Four Days

A cyber incident reportedly forced a British power plant to halt operations for about four…

6 hours ago

Russian Hackers Use New HOOKEDGE Malware to Spy on European Defense and Diplomatic Targets

Russian hackers have used a new backdoor called HOOKEDGE to target defense manufacturers, government bodies,…

6 hours ago

Ransomware Gang Claims AI Can Analyze 700GB of Stolen Data Every Hour

TITAN ransomware is pairing file encryption with an ambitious claim: artificial intelligence that can sort…

6 hours ago

Hackers Compromise Hundreds of WordPress Sites to Deploy Amatera Stealer via ClickFix

A fake student resume is being used to place a remote-access tool on researchers’ Windows…

8 hours ago