Packages

@next/bundle-analyzer

16.4.6 · 9 Nov 2026MIT6.4M / weekRepositoryHomepagenpmAtom feed

Your version

12.0.5

3 Dec 2021Where it was published

12.3.7 is the newest release of 12.x.

In short

1 removed1 security20 new37 fixed41 changed39 internal

  • Removed

    Remove trace_target env var in favor of .next/trace

  • Security

    Regression tests for this attack were added to the security integration test suite

Release note

This upgrade is completely backward-compatible and recommended for all users on versions below 12.0.5. A backport of the patch to Next.js 11 is available as 11.1.3.

When a URL is provided to next-server that cannot be parsed, an unhandledPromiseRejection could occur. On Node.js versions < v15.0.0 this isn't a fatal issue as only a warning is shown. However, in Node.js versions > v15.0.0, this causes the server process to exit, which can result in unexpected server crashes.

How to Upgrade

  • We have released patch versions for both the stable and canary channels of Next.js.

  • To upgrade run npm install next@latest --save

Impact

  • Affected: All of the following must be true to be affected

    • Next.js versions above v11.1.0 and below v12.0.5

    • Node.js above v15.0.0 being used

    • Using next start or a custom server

  • Not affected: Deployments on Vercel (vercel.com) are not affected along with similar environments where invalid requests are filtered before reaching Next.js.

We recommend everyone to upgrade regardless of whether you can reproduce the issue or not.

How to Assess Impact

If you are running Node.js > v15.0.0 with Next.js, you can filter any server error logs for ERR_INVALID_URL.

What is Being Done

As Next.js has grown in popularity and usage by enterprises, it has received the attention of security researchers and auditors. We are thankful to GitHub user hopeless-programmer-online for their investigation and discovery of the original bug.

We've landed a patch that ensures this is handled properly so the unhandledPromiseRejection issue no longer occurs.

Regression tests for this attack were added to the security integration test suite

  • A public CVE is requested.

  • We encourage responsible disclosure of future reports. Please email us at security@vercel.com. We are actively monitoring this mailbox.


Core Changes

  • Add a swc transform for removal of console.* calls.

  • Support ESLint v8

  • Allow next lint without eslint-config-next installed

  • Remove TextEncoder and TextDecoder wrappers

  • Simplify output messages

  • Update webpack

  • NextResponse: Add .json static method

  • Use _error for development in streaming

  • Refactor the middleware SSR loader

  • Add detection for Google-PageRenderer bot

  • Click-to-open error state for development overlay #14461

  • Ensure only one doctype is rendered

  • Update swc

  • Add/wasm build

  • telemetry: Track usage of 'optimizeFonts'

  • Make missing Document components an error

  • Adjust AVIF size so that its smaller than WebP size

  • Fix unhandled rejection on route change in dev

  • Re-add native package folders and ensure wasm artifacts are downloaded

  • Fix HMR for middleware #30791

  • Minor simplifications to renderToWebStream

  • Fix accessing router before ready for HMR ping

  • Implement SWC port of next-page-disallow-re-export-all-exports

  • Prevent no-html-link-for-pages from warning for static files

  • Move root div to an app wrapper

  • Add types for geo lat and long

  • Fix non-concurrent function _document

  • Remove outdated comment about string children being deprecated in next/link

  • middleware: Consider localhost variations

  • Update swc

  • Extract next-swc Rust code into its own package

  • Fix dev router usage before router initializing

  • Avoid mutating response.cookie options

  • Add cookies and headers for request using in RSC

  • Removed

    Remove trace_target env var in favor of .next/trace

  • Add error link when hydration error occurs

  • Fix initial compile timing incorrect measurement

  • Lazily init getStaticPathsWorker

  • Remove noop import

  • Update webpack

  • Fix wasm loading

  • Remove some watcher hacks and update version

  • Improve and refactor some types

  • Read file in swc when no loaders follow the next-swc-loader

  • Lazy-load postcss

  • Update webpack

  • Ensure middleware order is preserved

  • Refactor sandbox module cache

  • Fix hydration middleware effects

  • Support function components in _document in no-page-custom-font

  • Add support for removing React properties.

  • Include submodules in exported type definition

  • Move require.resolve into the module scope

  • Fix amp validator message format

  • Fix auto export condition in edge SSR

  • bugfix: Href value is not defined when typing out the href

  • Do not load external binding if local was found

  • Rsc headers

  • Add port and hostname options to Next Server

  • Cannot assign to read only property 'children'

  • Fix disabling of built-in CSS support if there is a custom loader

  • Include no-document-import-in-page rule in plugin index

  • Account for platform/arch not supported by napi-rs

  • Removng prop writable checking in prod

  • Enable default functional document when concurrentFeatures is enabled

  • Stop using environment variables in pages/_document

  • Fix image related link prop warning with react 18 beta

  • Escape string when converting to regexp

  • Add TS types for NextMiddleware

  • types: Add missing ua type for NextRequest

  • Ensure that external modules are not bundled into the client for RSC

  • Resolve streaming data for flight requests

  • Allow pre-release React 18 as peer

  • Link: Do not ignore onMouseEnter prop with absolute href

  • Add experimental.swcFileReading flag to disable file reading in swc

  • Fix middleware types with skipLibCheck: false

  • Include page for export errors for easier debugging

  • Avoid retaining webpack config too long

  • Skip warnings for Image not rendered to the dom

  • Improve exported root definitions

  • Fix running server with Polyfilled fetch

  • Ensure invalid URLs respond with 400 correctly

  • Remove future.strictPostcssConfiguration config

  • Revert "Fix running server with Polyfilled fetch (#31935)"

Misc Changes

  • Revert "Add docs for the Rust Compiler (SWC)."

  • Ensure wasm package.json is written before publish

  • Add docs for the Next.js Compiler written in Rust (leveraging SWC)

  • Fix prettier linting

  • Fix labels for release sections

  • Fix musl build

  • Enable require for swc_bundler

  • Add test case

  • Add next-swc to labeler

  • Add Rich, Maedah, and Ismael to the docs label

  • Fix copying swc binary for isolated tests locally

  • Fix the testall npm script

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.