Packages

@next/eslint-plugin-next

16.4.6 · 9 Nov 2026MIT57.3M / weekRepositoryHomepagenpmAtom feed

Your version

11.1.0

11 Aug 2021Where it was published

11.1.4 is the newest release of 11.x.

In short

4 security55 new41 fixed74 changed135 internal

  • Security

    A security team from one of our partners noticed an issue in Next.js that allowed for an open redirect to occur.

  • Security

    Specially encoded paths could be used when pages/_error.js was statically generated allowing an open redirect to occur to an external site.

  • Security

    We've landed a patch that ensures path parsing is handled properly for these paths so that the open redirect can no longer occur.

  • Security

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

Release note

A security team from one of our partners noticed an issue in Next.js that allowed for an open redirect to occur.

Specially encoded paths could be used when pages/_error.js was statically generated allowing an open redirect to occur to an external site.

In general, this redirect does not directly harm users although can allow for phishing attacks by redirecting to an attacker's domain from a trusted domain.

We recommend upgrading to the latest version of Next.js to improve the overall security of your application.

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: Users of Next.js between 10.0.5 and 10.2.0

  • Affected: Users of Next.js between 11.0.0 and 11.0.1 using pages/_error.js without getInitialProps

  • Affected: Users of Next.js between 11.0.0 and 11.0.1 using pages/_error.js and next export

  • Not affected: Deployments on Vercel (vercel.com) are not affected

  • Not affected: Deployments with pages/404.js

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

How to Assess Impact

If you think sensitive code or data could have been exposed, you can filter logs of affected sites by // (double slash at the start of the url) followed by a domain.

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 Gabriel Benmergui from Robinhood for their investigation and discovery of the original bug and subsequent responsible disclosure.

We've landed a patch that ensures path parsing is handled properly for these paths so that the open redirect can no longer occur.

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

  • We have notified known Next.js users in advance of this publication.

  • A public CVE was released.

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


Release notes

Core Changes

  • Don't test image domains in test env

  • Fix props not updating when changing the locale and keeping hash

  • Allow user to override next-image-loader

  • Add logging when a custom babelrc is loaded

  • Add comment to not edit in next-env file

  • Add trace url on bootup

  • Add check for ObjectExpression when iterating on <link> tags for font optimization

  • Fix GSP redirect cache error

  • Correct statusCode when visiting _error directly

  • Next dynamic with jest

  • Ensure API routes are not available under the locale

  • Fix image content type octet stream 400

  • Adds --max-warnings flag to next lint

  • Simplify next-dev-server implementation

  • Move code shared between server/client to "shared" folder

  • Move next-server directory files to server directory

  • Support new hydrate API in latest react 18 alpha release

  • Add upstream max-age to optimized image

  • Fix blurred image position when using objectPosition

  • Leverage blocked page for _error

  • Detect loop in client error page

  • Add onLoadingComplete() prop to Image component

  • Add "Vary: Accept" header to /_next/image responses

  • Add additional tests for image type detection

  • Fix immutable header for image with static import & unoptimized

  • Make sure 404 pages do not get cached by a CDN when using next start

  • Don't emit duplicate image files

  • Warn when response body is larger than 5mb

  • Added the key property to the pre next scripts

  • Ensure API route errors are propagated in minimal mode

  • 5MB -> 4MB body size limit

  • Update default .eslintrc file created to have .json format

  • Refactor decode failures

  • Add initial ResponsePayload support

  • More explicit typing for IncrementalCache API

  • Fix merge issue and use respondWith

  • (next/image): Merge query string params in imgix loader

  • (rewrites) incorrect parsing of destination query

  • Fix forward slash encoding while interpolating

  • Rename next/script interface Props to ScriptProps

  • Don't lazy-load already-loaded image in client-side transition

  • Loosen next/image TS types for width and height

  • Add dangerously-unoptimized loader for next/image

  • Fix hash change events not firing with i18n

  • Loosen next/image TS types for src

  • Provide Next.js postcss version to cssnano-simple

  • Rename next/image dangerously-unoptimized to custom and warn when applicable

  • Add newline to the end of next-env.d.ts

  • Add performance tracing for next-image-loader

  • Include message body in redirect responses

  • Add support for esm externals

  • Enhance next dev performance with placeholder=blur

  • Add batching to zipkin reporter

  • Bind sendBeacon to navigator

  • Fall back to fallbackSend when send is false

  • Prevent timeout when loading routes in development

  • Workaround for Node.js 16+ on Apple Silicon M1

  • Replace withCoalescedInvoke with ResponseCache

  • Add some missing fields to the NextConfig type

  • Update redirect regexes to not match _next

  • Bump babel target to Node.js 12

  • Use SWC to compile Next.js core server files

  • Fix css minify incorrectly duplicating variables

  • Fix gsp generation with file extension

  • Add minimumCacheTTL config for Image Optimization

  • Fix Script beforeInteractive on navigation

  • Improve static generation UX

  • Add warning for large number of routes

  • Add x-forward headers to external rewrites

  • Remove error when file patterns are unmatched + ESLint setup changes

  • Fix inline scripts being duplicated when used with next/script component

  • Fix minimumCacheTTL so it doesn't affect browser caching

  • Fix default server host value causing issues on Windows

  • Fix placeholder=blur inside <noscript>

  • Fix type NextWebVitalsMetric

  • Add RequestContext

  • Fix ISR page re-rendering after revalidate expiry (Fork of #24807)

  • Update NextConfig type to not require experimental or future fields

  • Allow enabling worker threads on dev server

  • Refactor i18n checks on request handling

  • Add configuration for ISR Memory Cache Size

  • Rename spr config to ISR

  • Add keepAlive to node-fetch polyfill

  • Fix external redirect with i18n domains

  • Don't cache null responses

  • Use Sharp if available for Image Optimization

  • Fix typo in error message

  • Add lazyBoundary prop to Image component

  • Ensure generateBuildId is not required in config type

  • Add eslint config options to NextConfig type

  • Wait for getFilesForRoute promise to fulfill before timeout in dev mode

  • Add config check for invalid duplicate locale domains

  • Add warning when next/image component has style prop

  • Adds --format flag to next lint

  • ESLint: Custom directories from next.config.js

  • Updated the Error message describing the alternative and added styles…

  • Clarify error message in isSerializableProps

  • Update eslint doc comment

  • Make router ready in case of custom _app getInitialProps

  • critical CSS: Use the assetPrefix in the critters config

  • Add initial next swc package with first transform

  • Add RenderResult

  • Document i18n locale limit

  • Added the content-disposition header

  • Use SWC for Next.js core client files

  • Upgrade to webpack 5.47.0 and webpack-sources 3.1.1

  • Persistent cache need to be invalidated when source-maps are enabled

  • Update report to leverage new variables

  • Update Terser

  • Ensure Next.js core development sourcemaps use correct input file

  • Undo sourcemap change

  • URI-encode url parameter in image optimizer

  • More React 17 clean up

  • Enforce source/destination limit for custom routes

  • Add naturalWidth/naturalHeight to onLoadingComplete() callback

  • Update webpack-sources to 3.2.0 for bugfixes and performance

  • Add next.config.js option to override default keepAlive

  • Port next-ssg getStaticProps/getServerSideProps tree shaking Babel transform to rust

  • Add handling for repeated slashes

  • Add/amp attribute patcher

  • Add missing removeHeader() function to image optimizer mock res

  • Fix html validation for Image component sizer

  • Update has query encoding when used in path

  • Introduce a new setup process when next lint is run for the first time

  • Remove unecessary fs.stat calls from recursive-readdir

  • Wrap last return statement in else to fix tree shaking

  • Update client error to show link in console

  • Upgrade styled-jsx

  • Add experimental SWC minify and SWC loader options

  • Use @vercel/fetch for run-tests requests

  • Add next dynamic swc transform

  • Add Import trace for requested module when it fails to resolve

  • Disable cache compression as it slows down the build

  • Remove extraneous fs.stat calls

  • Replace placeholder with blurDataURL in global StaticImageData type

  • Fix next/script unhandled promise rejection

  • Update to webpack 5.50.0

  • Remove duplicate type for StaticImageData

  • Add data-nimg attribute to image component

  • Add experimental concurrentFeatures config

  • Add warning during next build when sharp is missing

  • Next swc publish flow

Documentation Changes

  • Revert "Update data-fetching.md"

Example Changes

  • Hydration warning in with-mobx-state-tree-typescript example

  • Revert "Drop react-is dependency in styled-components example (#27527)"

Misc Changes

  • Fix error message during create-next-app

  • Add page with next/image to stats-app

  • Add test for placeholder=blur with assetPrefix

  • Add additional stats app pages

  • Add NextPage type to create-next-app typescript template

  • Support multiple pages directories for linting

  • Add --dev flag to bundle-analyzer install command

  • ESLint Config: Adds some more basic a11y rules

  • Fix eslint config next/core-web-vitals

  • Add sourceFileName for SWC compiled core files

  • package.json: Add contributor-friendly lifecycle scripts

  • Add type annotation for NextConfig to CNA typescript template

  • Add rootDir setting to eslint-plugin-next

  • Revert "Next swc publish flow (#27932)"

  • Revert "Add warning during next build when sharp is missing (#27933)"

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.