Next.js 15.4.1 introduces notable updates compared to its predecessor, 15.4.0, primarily focusing on dependency upgrades and bug fixes to enhance stability and performance. A key difference lies in the @next/env and @next/font dependencies, where 15.4.1 utilizes stable versions while 15.4.0 relies on canary releases. This change suggests a move towards more reliable and tested features in the newer version. @rspack/core was also updated from 1.3.12 to 1.4.5.
A significant update is the bump in peer dependencies. Notably, @playwright/test now requires version ^1.51.1 compared to ^1.41.2 in the previous version, which indicates new testing features or compatibility requirements. Additionally only in the new version, the library incorporates @next/swc version 15.4.1 and upgrades @storybook/addon-webpack5-compiler-swc to version 3.0.0, while the older version had 15.4.0 and 1.0.5 respectively. This also indicates improvements in the SWC compiler integration.
Furthermore, version 15.4.1 appears to have a reduced file count and a slightly larger unpacked size, which may reflect internal optimizations and feature adjustments. The release date indicates a more recent update, ensuring developers have access to the latest enhancements and resolutions. Developers upgrading should pay attention to the updated peer dependencies, particularly @playwright/test, to ensure compatibility within their projects and take advantage of Next.js's continuous improvements in performance, stability, and the developer experience.
All the vulnerabilities related to the version 15.4.1 of the package
Next.js Affected by Cache Key Confusion for Image Optimization API Routes
A vulnerability in Next.js Image Optimization has been fixed in v15.4.5 and v14.2.31. When images returned from API routes vary based on request headers (such as Cookie
or Authorization
), these responses could be incorrectly cached and served to unauthorized users due to a cache key confusion bug.
All users are encouraged to upgrade if they use API routes to serve images that depend on request headers and have image optimization enabled.
More details at Vercel Changelog
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