S4E just found a medium log file scanner
high·Product Based Web Vulnerabilities·Updated Oct 8, 2024

CVE-2024-34351 Scanner

CVE-2024-34351 Scanner - Server-Side-Request-Forgery (SSRF) vulnerability in Next.js

Est. Time~1 minutes
Scan TypeSingle Scan
Targetsurl
CostFree
2.7k
Times Used
continuous scan runs
3.4k
Continuously Checked
assets under CS
3
Vulnerabilities Found
confirmed findings
References
CVECVE-2024-34351
7.5
CVSShigh
Exploitable remotely over the internet · no authentication required.

Next.js is a React framework that can provide building blocks to create web applications. A Server-Side Request Forgery (SSRF) vulnerability was identified in Next.js Server Actions. If the `Host` header is modified, and the below conditions are also met, an attacker may be able to make requests that appear to be originating from the Next.js application server itself. The required conditions are 1) Next.js is running in a self-hosted manner; 2) the Next.js application makes use of Server Actions; and 3) the Server Action performs a redirect to a relative path which starts with a `/`. This vulnerability was fixed in Next.js `14.1.1`.

Attack Vector
Network
Privileges Req.
None
User Interaction
None
Affected
next.jsby vercel
>= 13.4.0, < 14.1.1
next.jsby vercel
AFFECTED< 14.1.1SAFE ✓≥ 14.1.1
Updated Aug 22, 2026View on NVD →
Detail

Next.js is a widely-used React framework that provides developers with a server-rendered or statically exported application. It is maintained by Vercel and often utilized by developers aiming to build efficient, production-ready applications quickly. The framework's built-in capabilities like server-side rendering (SSR), image optimization, and static file serving attract a broad base from corporations to individual developers. As a result, it is crucial for developers to ensure their applications are secure by keeping track of vulnerabilities that could be exploited in production environments. This is especially true for versions before 14.1.1, where security weaknesses have been detected. Next.js aims to offer a robust solution for complex React applications, and staying updated on its security matters is a major part of maintaining its utility.

The Server-Side Request Forgery (SSRF) vulnerability allows attackers to make requests from the server-side rather than directly from the client-side. In the context of Next.js, the SSRF vulnerability exists in its image optimization component, where requests to external resources can be manipulated. This type of vulnerability can potentially allow attackers to exploit server capabilities to access unauthorized data or interact with internal systems. With SSRF, unauthorized requests can target internal-only endpoints, increasing the risk exposure substantially. Addressing such vulnerabilities by ensuring up-to-date versions of Next.js is vital to maintaining secure application environments.

Technical details of this vulnerability reveal that the image optimization component doesn't properly validate URLs. As a result, URLs containing interactions with external servers can be manipulated for malicious purposes. Vulnerable parameters include those manually set through the URL fields within the system, leaving endpoints exposed to exploitation. Such vulnerabilities emerge when insufficient validation allows unintended server communications. Addressing this vulnerability involves comprehensive input validation and prompt version upgrades, ensuring that no rogue or unauthorized resources are accessed.

When this vulnerability is successfully exploited, attackers can access information they shouldn't have access to, potentially culminating in data exposure or unauthorized interactions with backend systems. In a worst-case scenario, sensitive company data or operations could be affected due to SSRF activities. This puts the organization's internal data at risk, as external attackers could input arbitrary URLs to initiate communications through the server. Recognizing and remediating SSRF issues thus becomes imperative in not only protecting data integrity but also preventing unauthorized data flow.

REFERENCES

Solution Advice
  • Upgrade to Next.js version 14.1.1 or higher to ensure all known vulnerabilities related to SSRF are remediated.
  • Regularly audit the code for potential SSRF exposures by examining URL and web request handling practices.
  • Implement strict input validation to reduce the risk of malicious URLs being processed through the server.
  • Ensure safe configurations for server handling of HTTP/S requests to prevent redirection or unexpected forwarding.
  • Conduct periodic security assessments and testing to uncover potential vulnerabilities ahead of time.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2024-34351 Scanner - Server-Side-Request-Forgery (SSRF) vulnerability in Next.js S4E