Repository navigation
bug: upgrade express-fileupload 0.0.5 -> 1.5.2 (CVE-2020-7699 prototype pollution) - #1127
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
SNYK-JS-EXPRESSFILEUPLOAD-595969: prototype pollution via parseNested. 1.5.2 rejects __proto__/constructor keys in processNested. busboy 0.3.1 -> 1.6.0; connect-busboy and dicer dropped from the tree. Refs: sfind-a35c4dbc7dde4b45aa90c750a942794f
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Snyk finding SNYK-JS-EXPRESSFILEUPLOAD-595969 / CVE-2020-7699: prototype pollution in express-fileupload (
package.json:28, used byapp.use(fileUpload())inapp.js:22). Code scan findingsfind-a35c4dbc7dde4b45aa90c750a942794f.busboy ^1.6.0, node >= 12).connect-busboyanddicerare no longer in the tree. Nothing else changed.routes.importusesreq.files.importFile.data(a Buffer), and with the defaultuseTempFiles: falseit is still populated in 1.x. If the request has no file,req.filesis still undefined, so the'No files were uploaded.'branch is unchanged.Duplicate note: PR #1036 (
sfind-70fb9190, 1.5.1) fixes the same CVE. This PR is the separate PR for the new finding ID. Only one of the two should be merged.Verification
app.js/import flow (in-memory Mongo stand-in, multipart upload with curl). Results were identical before and after: upload returns 302, both imported todos show on/, a request with no file part returns "No files were uploaded.", and a__proto__.pollutedfield does not polluteObject.prototype.fileUpload({ parseNested: true }), using fields__proto__.pollutedandconstructor.prototype.polluted2:({}).polluted === "yes", so the prototype was polluted.{"polluted":"yes","prototype":{...}}).parseNested, so the PoC doesn't pollute it. Snyk still lists it in the affected range and marks it deprecated ("Please upgrade express-fileupload to version 1.1.8+").npm testrunssnyk test, which needs Snyk auth.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/79c312f58dce458d928daf0c07858cf9
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/79c312f58dce458d928daf0c07858cf9?variant=devin
Devin Review