Next.js version 0.3.0 represents a notable update from version 0.2.14, introducing key changes in its dependency structure and core functionality. While both versions provide Node.js extensions, version 0.3.0 deprecates the previous description, hinting at a newer approach or target. Developers will observe a refined dependency list, with "es5-ext" updated from "0.8.x" to "0.9.x" and "deferred" moving from "0.5.x" to "0.6.x". The removal of "minimatch" and "event-emitter", replaced by "memoizee" at version "~0.2.2", signals a potential shift in the library's core functionalities, possibly focusing more on memoization and performance optimization, while dropping functionalities related to file matching and event handling.
For developers, this translates to a possible change in the API and behavior of the "next" package. The inclusion of "memoizee" suggests enhanced capabilities for caching and optimizing function calls, potentially leading to improved application performance. The removal of dependencies like "minimatch" and "event-emitter" might indicate that certain features may be deprecated or require alternative implementations using other modules, so a carefully review of the code is needed to keep back compatibility if upgrading from the older version. Therefore, developers upgrading from 0.2.14 need to carefully examine the new dependencies and adjust their code accordingly. The update signifies a move towards potentially more focused Node.js extensions, emphasizing efficiency and specialized utilities.
All the vulnerabilities related to the version 0.3.0 of the package
Directory Traversal in Next.js
serverless
targetnext export
We recommend everyone to upgrade regardless of whether you can reproduce the issue or not.
https://github.com/zeit/next.js/releases/tag/v9.3.2
https://github.com/zeit/next.js/releases/tag/v9.3.2
Next.js Race Condition to Cache Poisoning
Summary
We received a responsible disclosure from Allam Rachid (zhero) for a low-severity race-condition vulnerability in Next.js. This issue only affects the Pages Router under certain misconfigurations, causing normal endpoints to serve pageProps
data instead of standard HTML.
Credit
Thank you to Allam Rachid (zhero) for the responsible disclosure. This research was rewarded as part of our bug bounty program.
Next.js Content Injection Vulnerability for Image Optimization
A vulnerability in Next.js Image Optimization has been fixed in v15.4.5 and v14.2.31. The issue allowed attacker-controlled external image sources to trigger file downloads with arbitrary content and filenames under specific configurations. This behavior could be abused for phishing or malicious file delivery.
All users relying on images.domains
or images.remotePatterns
are encouraged to upgrade and verify that external image sources are strictly validated.
More details at Vercel Changelog
Next.js Improper Middleware Redirect Handling Leads to SSRF
A vulnerability in Next.js Middleware has been fixed in v14.2.32 and v15.4.7. The issue occurred when request headers were directly passed into NextResponse.next()
. In self-hosted applications, this could allow Server-Side Request Forgery (SSRF) if certain sensitive headers from the incoming request were reflected back into the response.
All users implementing custom middleware logic in self-hosted environments are strongly encouraged to upgrade and verify correct usage of the next()
function.
More details at Vercel Changelog