Skip to content

๐Ÿšจ [security] [test] Update next 13.5.7 โ†’ 15.3.2 (major) #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented May 15, 2025


๐Ÿšจ Your current dependencies have known security vulnerabilities ๐Ÿšจ

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

โœณ๏ธ next (13.5.7 โ†’ 15.3.2) ยท Repo

Security Advisories ๐Ÿšจ

๐Ÿšจ Information exposure in Next.js dev server due to lack of origin verification

Summary

This vulnerability is similar to CVE-2018-14732. When running a Next.js server locally (e.g. through npm run dev), the WebSocket server is vulnerable to the Cross-site WebSocket hijacking (CSWSH) attack. and a bad actor can access the source code of client components, if a user was to visit a malicious link while having the Next.js dev server running.

Impact

If a user is running a Next.js server locally (e.g. npm run dev), and they were to browse to a malicious website, the malicious website may be able to access the source code of the Next.js app. This vulnerability only affects applications making use of App Router.

Note: App Router was experimental requiring experimental.appDir = true in versions >=13.0.0 to <13.4.

๐Ÿšจ 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.

Learn more here

Credit
Thank you to Allam Rachid (zhero) for the responsible disclosure. This research was rewarded as part of our bug bounty program.

๐Ÿšจ 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.

Learn more here

Credit
Thank you to Allam Rachid (zhero) for the responsible disclosure. This research was rewarded as part of our bug bounty program.

๐Ÿšจ Next.js may leak x-middleware-subrequest-id to external hosts

Summary

In the process of remediating CVE-2025-29927, we looked at other possible exploits of Middleware. We independently verified this low severity vulnerability in parallel with two reports from independent researchers.

Learn more here.

Credit

Thank you to Jinseo Kim kjsman andย RyotaK (GMO Flatt Security Inc.) with takumi-san.aiย for the responsible disclosure. These researchers were awarded as part of our bug bounty program.

๐Ÿšจ Next.js may leak x-middleware-subrequest-id to external hosts

Summary

In the process of remediating CVE-2025-29927, we looked at other possible exploits of Middleware. We independently verified this low severity vulnerability in parallel with two reports from independent researchers.

Learn more here.

Credit

Thank you to Jinseo Kim kjsman andย RyotaK (GMO Flatt Security Inc.) with takumi-san.aiย for the responsible disclosure. These researchers were awarded as part of our bug bounty program.

๐Ÿšจ Next.js may leak x-middleware-subrequest-id to external hosts

Summary

In the process of remediating CVE-2025-29927, we looked at other possible exploits of Middleware. We independently verified this low severity vulnerability in parallel with two reports from independent researchers.

Learn more here.

Credit

Thank you to Jinseo Kim kjsman andย RyotaK (GMO Flatt Security Inc.) with takumi-san.aiย for the responsible disclosure. These researchers were awarded as part of our bug bounty program.

๐Ÿšจ Authorization Bypass in Next.js Middleware

Impact

It is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware.

Patches

  • For Next.js 15.x, this issue is fixed in 15.2.3
  • For Next.js 14.x, this issue is fixed in 14.2.25
  • For Next.js 13.x, this issue is fixed in 13.5.9
  • For Next.js 12.x, this issue is fixed in 12.3.5
  • For Next.js 11.x, consult the below workaround.

Note: Next.js deployments hosted on Vercel are automatically protected against this vulnerability.

Workaround

If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.

Credits

  • Allam Rachid (zhero;)
  • Allam Yasser (inzo_)

๐Ÿšจ Authorization Bypass in Next.js Middleware

Impact

It is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware.

Patches

  • For Next.js 15.x, this issue is fixed in 15.2.3
  • For Next.js 14.x, this issue is fixed in 14.2.25
  • For Next.js 13.x, this issue is fixed in 13.5.9
  • For Next.js 12.x, this issue is fixed in 12.3.5
  • For Next.js 11.x, consult the below workaround.

Note: Next.js deployments hosted on Vercel are automatically protected against this vulnerability.

Workaround

If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.

Credits

  • Allam Rachid (zhero;)
  • Allam Yasser (inzo_)

๐Ÿšจ Authorization Bypass in Next.js Middleware

Impact

It is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware.

Patches

  • For Next.js 15.x, this issue is fixed in 15.2.3
  • For Next.js 14.x, this issue is fixed in 14.2.25
  • For Next.js 13.x, this issue is fixed in 13.5.9
  • For Next.js 12.x, this issue is fixed in 12.3.5
  • For Next.js 11.x, consult the below workaround.

Note: Next.js deployments hosted on Vercel are automatically protected against this vulnerability.

Workaround

If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.

Credits

  • Allam Rachid (zhero;)
  • Allam Yasser (inzo_)

๐Ÿšจ Next.js Allows a Denial of Service (DoS) with Server Actions

Impact

A Denial of Service (DoS) attack allows attackers to construct requests that leaves requests to Server Actions hanging until the hosting provider cancels the function execution.

Note: Next.js server is idle during that time and only keeps the connection open. CPU and memory footprint are low during that time.

Deployments without any protection against long running Server Action invocations are especially vulnerable. Hosting providers like Vercel or Netlify set a default maximum duration on function execution to reduce the risk of excessive billing.

This is the same issue as if the incoming HTTP request has an invalid Content-Length header or never closes. If the host has no other mitigations to those then this vulnerability is novel.

This vulnerability affects only Next.js deployments using Server Actions.

Patches

This vulnerability was resolved in Next.js 14.2.21, 15.1.2, and 13.5.8. We recommend that users upgrade to a safe version.

Workarounds

There are no official workarounds for this vulnerability.

Credits

Thanks to the PackDraw team for responsibly disclosing this vulnerability.

๐Ÿšจ Next.js Allows a Denial of Service (DoS) with Server Actions

Impact

A Denial of Service (DoS) attack allows attackers to construct requests that leaves requests to Server Actions hanging until the hosting provider cancels the function execution.

Note: Next.js server is idle during that time and only keeps the connection open. CPU and memory footprint are low during that time.

Deployments without any protection against long running Server Action invocations are especially vulnerable. Hosting providers like Vercel or Netlify set a default maximum duration on function execution to reduce the risk of excessive billing.

This is the same issue as if the incoming HTTP request has an invalid Content-Length header or never closes. If the host has no other mitigations to those then this vulnerability is novel.

This vulnerability affects only Next.js deployments using Server Actions.

Patches

This vulnerability was resolved in Next.js 14.2.21, 15.1.2, and 13.5.8. We recommend that users upgrade to a safe version.

Workarounds

There are no official workarounds for this vulnerability.

Credits

Thanks to the PackDraw team for responsibly disclosing this vulnerability.

๐Ÿšจ Next.js Allows a Denial of Service (DoS) with Server Actions

Impact

A Denial of Service (DoS) attack allows attackers to construct requests that leaves requests to Server Actions hanging until the hosting provider cancels the function execution.

Note: Next.js server is idle during that time and only keeps the connection open. CPU and memory footprint are low during that time.

Deployments without any protection against long running Server Action invocations are especially vulnerable. Hosting providers like Vercel or Netlify set a default maximum duration on function execution to reduce the risk of excessive billing.

This is the same issue as if the incoming HTTP request has an invalid Content-Length header or never closes. If the host has no other mitigations to those then this vulnerability is novel.

This vulnerability affects only Next.js deployments using Server Actions.

Patches

This vulnerability was resolved in Next.js 14.2.21, 15.1.2, and 13.5.8. We recommend that users upgrade to a safe version.

Workarounds

There are no official workarounds for this vulnerability.

Credits

Thanks to the PackDraw team for responsibly disclosing this vulnerability.

๐Ÿšจ Next.js authorization bypass vulnerability

Impact

If a Next.js application is performing authorization in middleware based on pathname, it was possible for this authorization to be bypassed.

Patches

This issue was patched in Next.js 14.2.15 and later.

If your Next.js application is hosted on Vercel, this vulnerability has been automatically mitigated, regardless of Next.js version.

Workarounds

There are no official workarounds for this vulnerability.

Credits

We'd like to thank tyage (GMO CyberSecurity by IERAE) for responsible disclosure of this issue.

๐Ÿšจ Denial of Service condition in Next.js image optimization

Impact

The image optimization feature of Next.js contained a vulnerability which allowed for a potential Denial of Service (DoS) condition which could lead to excessive CPU consumption.

Not affected:

  • The next.config.js file is configured with images.unoptimized set to true or images.loader set to a non-default value.
  • The Next.js application is hosted on Vercel.

Patches

This issue was fully patched in Next.js 14.2.7. We recommend that users upgrade to at least this version.

Workarounds

Ensure that the next.config.js file has either images.unoptimized, images.loader or images.loaderFile assigned.

Credits

Brandon Dahler (brandondahler), AWS
Dimitrios Vlastaras

๐Ÿšจ Next.js Cache Poisoning

Impact

By sending a crafted HTTP request, it is possible to poison the cache of a non-dynamic server-side rendered route in the pages router (this does not affect the app router). When this crafted request is sent it could coerce Next.js to cache a route that is meant to not be cached and send a Cache-Control: s-maxage=1, stale-while-revalidate header which some upstream CDNs may cache as well.

To be potentially affected all of the following must apply:

  • Next.js between 13.5.1 and 14.2.9
  • Using pages router
  • Using non-dynamic server-side rendered routes e.g. pages/dashboard.tsx not pages/blog/[slug].tsx

The below configurations are unaffected:

  • Deployments using only app router
  • Deployments on Vercel are not affected

Patches

This vulnerability was resolved in Next.js v13.5.7, v14.2.10, and later. We recommend upgrading regardless of whether you can reproduce the issue or not.

Workarounds

There are no official or recommended workarounds for this issue, we recommend that users patch to a safe version.

Credits

  • Allam Rachid (zhero_)
  • Henry Chen

๐Ÿšจ Next.js Server-Side Request Forgery in Server Actions

Impact

A Server-Side Request Forgery (SSRF) vulnerability was identified in Next.js Server Actions by security researchers at Assetnote. 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.

Prerequisites

  • Next.js (<14.1.1) is running in a self-hosted* manner.
  • The Next.js application makes use of Server Actions.
  • The Server Action performs a redirect to a relative path which starts with a /.

* Many hosting providers (including Vercel) route requests based on the Host header, so we do not believe that this vulnerability affects any Next.js applications where routing is done in this manner.

Patches

This vulnerability was patched in #62561 and fixed in Next.js 14.1.1.

Workarounds

There are no official workarounds for this vulnerability. We recommend upgrading to Next.js 14.1.1.

Credit

Vercel and the Next.js team thank Assetnote for responsibly disclosing this issue to us, and for working with us to verify the fix. Thanks to:

Adam Kues - Assetnote
Shubham Shah - Assetnote

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 7 commits:

โœณ๏ธ @โ€‹playwright/test (1.39.0 โ†’ 1.52.0) ยท Repo

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

โ†—๏ธ @โ€‹next/env (indirect, 13.5.7 โ†’ 15.3.2) ยท Repo

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by 7 commits:

โ†—๏ธ @โ€‹swc/helpers (indirect, 0.5.2 โ†’ 0.5.15) ยท Repo

Sorry, we couldn't find anything useful about this release.

โ†—๏ธ caniuse-lite (indirect, 1.0.30001418 โ†’ 1.0.30001718) ยท Repo ยท Changelog

โ†—๏ธ playwright (indirect, 1.39.0 โ†’ 1.52.0) ยท Repo

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

โ†—๏ธ playwright-core (indirect, 1.39.0 โ†’ 1.52.0) ยท Repo

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

โ†—๏ธ styled-jsx (indirect, 5.1.1 โ†’ 5.1.6) ยท Repo ยท Changelog

Release Notes

5.1.6

5.1.6 (2024-05-24)

Bug Fixes

5.1.5

5.1.5 (2024-05-24)

Bug Fixes

  • Correct context for declaration files (#847) (3e372f2)

5.1.4

5.1.4 (2024-05-24)

Bug Fixes

5.1.3

5.1.3 (2024-05-07)

Bug Fixes

5.1.2

5.1.2 (2023-01-25)

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 7 commits:

โ†—๏ธ tslib (indirect, 2.4.1 โ†’ 2.8.1) ยท Repo

Release Notes

2.8.1

What's Changed

Full Changelog: v2.8.0...v2.8.1

2.8.0

What's Changed

Full Changelog: v2.7.0...v2.8.0

2.7.0

What's Changed

  • Implement deterministic collapse of await in await using by @rbuckton in #262
  • Use global 'Iterator.prototype' for downlevel generators by @rbuckton in #267

Full Changelog: v2.6.3...v2.7.0

2.6.3

What's Changed

Full Changelog: v2.6.2...v2.6.3

2.6.2

What's Changed

Full Changelog: v2.6.1...v2.6.2

2.6.1

What's Changed

Full Changelog: 2.6.0...v2.6.1

2.6.0

What's Changed

Full Changelog: v2.5.3...2.6.0

2.5.3

What's Changed

Full Changelog: 2.5.2...v2.5.3

2.5.2

This release explicitly re-exports helpers to work around TypeScript's incomplete symbol resolution for tslib.

2.5.1

This release of tslib provides fixes for two issues.

First, it reverses the order of init hooks provided by decorators to correctly reflect proposed behavior.

Second, it corrects the exports field of tslib's package.json and provides accurate declaration files so that it may be consumed under the node16 and bundler settings for moduleResolution.

2.5.0

What's New

  • Fix asyncDelegator reporting done too early by @apendua in #187
  • Add support for TypeScript 5.0's __esDecorate and related helpers by @rbuckton in #193

Full Changelog: 2.4.1...2.5.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 71 commits:

๐Ÿ†• @โ€‹emnapi/runtime (added, 1.4.3)

๐Ÿ†• @โ€‹img/sharp-darwin-arm64 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-darwin-x64 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-libvips-darwin-arm64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-darwin-x64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linux-arm (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linux-arm64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linux-ppc64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linux-s390x (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linux-x64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linuxmusl-arm64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-libvips-linuxmusl-x64 (added, 1.1.0)

๐Ÿ†• @โ€‹img/sharp-linux-arm (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-linux-arm64 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-linux-s390x (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-linux-x64 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-linuxmusl-arm64 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-linuxmusl-x64 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-wasm32 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-win32-ia32 (added, 0.34.1)

๐Ÿ†• @โ€‹img/sharp-win32-x64 (added, 0.34.1)

๐Ÿ†• @โ€‹swc/counter (added, 0.1.3)

๐Ÿ†• color (added, 4.2.3)

๐Ÿ†• color-string (added, 1.9.1)

๐Ÿ†• detect-libc (added, 2.0.4)

๐Ÿ†• is-arrayish (added, 0.3.2)

๐Ÿ†• sharp (added, 0.34.1)

๐Ÿ†• simple-swizzle (added, 0.2.2)

๐Ÿ—‘๏ธ @โ€‹next/swc-win32-ia32-msvc (removed)

๐Ÿ—‘๏ธ glob-to-regexp (removed)

๐Ÿ—‘๏ธ watchpack (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@โ€‹depfu rebase
Rebases against your default branch and redoes this update
@โ€‹depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@โ€‹depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@โ€‹depfu cancel merge
Cancels automatic merging of this PR
@โ€‹depfu close
Closes this PR and deletes the branch
@โ€‹depfu reopen
Restores the branch and reopens this PR (if it's closed)
@โ€‹depfu pause
Ignores all future updates for this dependency and closes this PR
@โ€‹depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@โ€‹depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

Copy link
Contributor Author

depfu bot commented Jun 13, 2025

Closed in favor of #179.

@depfu depfu bot closed this Jun 13, 2025
@depfu depfu bot deleted the depfu/update/test/npm/next-15.3.2 branch June 13, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants