θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Conversation

@depfu
Copy link

@depfu depfu bot commented Apr 18, 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 update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ @​next/eslint-plugin-next (15.1.5 β†’ 15.3.1)

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

✳️ next (15.1.5 β†’ 15.3.1) Β· Repo

Security Advisories 🚨

🚨 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_)
Release Notes

15.3.1

More info than we can show here.

15.3.0

More info than we can show here.

15.2.5

More info than we can show here.

15.2.4

More info than we can show here.

15.2.3

More info than we can show here.

15.2.2

More info than we can show here.

15.2.1

More info than we can show here.

15.2.0

More info than we can show here.

15.1.7

More info than we can show here.

15.1.6

More info than we can show here.

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

Commits

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


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)

Summary by Sourcery

Update Next.js and related dependencies to address security vulnerabilities

New Features:

  • Upgrade to Next.js 15.3.1 with the latest security patches

Bug Fixes:

  • Patch two security vulnerabilities in Next.js middleware: an authorization bypass and a potential information leak of x-middleware-subrequest-id

@depfu depfu bot added the depfu label Apr 18, 2025
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@codesandbox
Copy link

codesandbox bot commented Apr 18, 2025

Review or Edit in CodeSandbox

Open the branch in Web Editor β€’ VS Code β€’ Insiders

Open Preview

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 18, 2025

Reviewer's Guide by Sourcery

This pull request updates Next.js and related dependencies to address known security vulnerabilities. The update includes changes to next, @next/eslint-plugin-next, various @img/sharp-* and @img/sharp-libvips-* packages, and @emnapi/runtime. These updates are crucial for maintaining the application's security posture.

Sequence diagram for Authorization Bypass in Next.js Middleware

sequenceDiagram
    participant User
    participant Browser
    participant Next.js Middleware
    participant Backend Server

    User->>Browser: Makes a request
    Browser->>Next.js Middleware: Request with x-middleware-subrequest header
    alt Vulnerable Next.js version
        Next.js Middleware->>Backend Server: Bypasses authorization check
        Backend Server-->>Next.js Middleware: Returns data
        Next.js Middleware-->>Browser: Returns data
    else Fixed Next.js version
        Next.js Middleware->>Next.js Middleware: Performs authorization check
        alt Authorization fails
            Next.js Middleware-->>Browser: Returns error
        else Authorization succeeds
            Next.js Middleware->>Backend Server: Request with authorization
            Backend Server-->>Next.js Middleware: Returns data
            Next.js Middleware-->>Browser: Returns data
        end
    end
Loading

File-Level Changes

Change Details Files
Updated next and @next/eslint-plugin-next dependencies to address security vulnerabilities.
  • Updated next from 15.1.5 to 15.3.1.
  • Updated @next/eslint-plugin-next from 15.1.5 to 15.3.1.
pnpm-lock.yaml
apps/web/package.json
package.json
packages/eslint-config/package.json
Updated various @img/sharp-* dependencies.
  • Updated @img/sharp-darwin-arm64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-darwin-x64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-linux-arm64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-linux-arm from 0.33.5 to 0.34.1.
  • Updated @img/sharp-linux-s390x from 0.33.5 to 0.34.1.
  • Updated @img/sharp-linux-x64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-linuxmusl-arm64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-linuxmusl-x64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-win32-ia32 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-win32-x64 from 0.33.5 to 0.34.1.
  • Updated @img/sharp-wasm32 from 0.33.5 to 0.34.1.
pnpm-lock.yaml
Updated various @img/sharp-libvips-* dependencies.
  • Updated @img/sharp-libvips-darwin-arm64 from 1.0.4 to 1.1.0.
  • Updated @img/sharp-libvips-darwin-x64 from 1.0.4 to 1.1.0.
  • Updated @img/sharp-libvips-linux-arm from 1.0.5 to 1.1.0.
  • Updated @img/sharp-libvips-linux-arm64 from 1.0.4 to 1.1.0.
  • Updated @img/sharp-libvips-linux-s390x from 1.0.4 to 1.1.0.
  • Updated @img/sharp-libvips-linux-x64 from 1.0.4 to 1.1.0.
  • Updated @img/sharp-libvips-linuxmusl-arm64 from 1.0.4 to 1.1.0.
  • Updated @img/sharp-libvips-linuxmusl-x64 from 1.0.4 to 1.1.0.
pnpm-lock.yaml
Updated @emnapi/runtime from 1.3.1 to 1.4.3.
  • Updated @emnapi/runtime from 1.3.1 to 1.4.3.
pnpm-lock.yaml
Updated @codecov/nextjs-webpack-plugin version.
  • Updated @codecov/nextjs-webpack-plugin from 1.7.0(next@15.1.5(...)) to 1.7.0(next@15.3.1(...)).
pnpm-lock.yaml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, depfu[bot]!). We assume it knows what it's doing!

@depfu
Copy link
Author

depfu bot commented May 8, 2025

Closed in favor of #170.

@depfu depfu bot closed this May 8, 2025
@depfu depfu bot deleted the depfu/update/pnpm/group/nextjs-15.3.1 branch May 8, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants