Skip to content

🚨 [security] Update multer 1.4.5-lts.1 β†’ 2.0.0 (major)#8

Merged
browser-vm merged 1 commit intomainfrom
depfu/update/npm/multer-2.0.0
May 22, 2025
Merged

🚨 [security] Update multer 1.4.5-lts.1 β†’ 2.0.0 (major)#8
browser-vm merged 1 commit intomainfrom
depfu/update/npm/multer-2.0.0

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented May 20, 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?

✳️ multer (1.4.5-lts.1 β†’ 2.0.0) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 Multer vulnerable to Denial of Service via memory leaks from unclosed streams

Impact

Multer <2.0.0 is vulnerable to a resource exhaustion and memory leak issue due to improper stream handling. When the HTTP request stream emits an error, the internal busboy stream is not closed, violating Node.js stream safety guidance.

This leads to unclosed streams accumulating over time, consuming memory and file descriptors. Under sustained or repeated failure conditions, this can result in denial of service, requiring manual server restarts to recover. All users of Multer handling file uploads are potentially impacted.

Patches

Users should upgrade to 2.0.0

Workarounds

None

References

🚨 Multer vulnerable to Denial of Service from maliciously crafted requests

Impact

A vulnerability in Multer versions >=1.4.4-lts.1 allows an attacker to trigger a Denial of Service (DoS) by sending a malformed multi-part upload request. This request causes an unhandled exception, leading to a crash of the process.

Patches

Users should upgrade to 2.0.0

Workarounds

None

References

Commits

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


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

Upgrade multer from 1.4.5-lts.1 to 2.0.0 to address critical security vulnerabilities.

Bug Fixes:

  • Fix memory leaks from unclosed streams on request errors.
  • Prevent process crashes from malformed multipart upload requests causing denial of service.

Chores:

  • Bump multer dependency to version 2.0.0 in package.json

@depfu depfu bot added the depfu label May 20, 2025
@netlify
Copy link

netlify bot commented May 20, 2025

βœ… Deploy Preview for colorflux ready!

Name Link
πŸ”¨ Latest commit f000777
πŸ” Latest deploy log https://app.netlify.com/projects/colorflux/deploys/682bc75b3fdc840008e08d44
😎 Deploy Preview https://deploy-preview-8--colorflux.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sourcery-ai
Copy link

sourcery-ai bot commented May 20, 2025

Reviewer's Guide

This PR upgrades the multer package from 1.4.5-lts.1 to 2.0.0 to remediate two Denial of Service vulnerabilities by updating the dependency in package.json and regenerating the lockfile.

File-Level Changes

Change Details Files
Upgrade multer to 2.0.0 for security fixes
  • Bumped multer version in package.json
  • Regenerated package-lock.json to reflect new dependency tree
package.json
package-lock.json

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!

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

@browser-vm browser-vm merged commit 668794b into main May 22, 2025
5 of 8 checks passed
@depfu depfu bot deleted the depfu/update/npm/multer-2.0.0 branch May 22, 2025 02:16
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.

1 participant