Skip to content

Fix npm audit vulnerabilities (#1118) - #1119

Open
gangster wants to merge 4 commits into
shift-org:mainfrom
gangster:issue-1118-npm-audit
Open

gangster wants to merge 4 commits into
shift-org:mainfrom
gangster:issue-1118-npm-audit

Conversation

@gangster

@gangster gangster commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1118

  • Bump multer 2.4, mysql2 3.24, lodash 4.18, nodemailer 10, sqlite3 6, faker 10
  • Override hugo-installer's semver to 7.7
  • Update seeded test expectations (faker 10 changed seeded output)

npm audit goes from 34 to 9. The rest (decompress, braces) have no fixed
release and are install/dev only, via hugo-installer.

@ionous

ionous commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

updating the dependencies seems good. thanks!

question: are there any issues with not limiting the number of fields and parts?

the only thing i could think of was some denial of service based on a too large memory request ... but i imagine the server still has to have allocated the memory since it received the form and is in the process of reading it?

( also on that one, i generally wouldn't recommend tests to exercise features of a well tested support library... we could crazy that way. )

all that said, fixing up the vulnerabilities seems important enough tho that it's worth it to take these changes as is. ( and looks like in the lingering intervening time, we have more we should look at updating now. )

@gangster

Copy link
Copy Markdown
Contributor Author

Fair points. nginx already caps the request at ~5MB and buffers it before the app sees it, so the limits weren't buying much (and fieldNameSize was just the default). I dropped them and their tests, so this is just the dependency bumps now. I'll look at the remaining audit items in a follow-up.

@ionous

ionous commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

sweet! thank you. we'll wait till next week when andrew is around, so we can run a backup first; but then we'll get this merged in.

gangster and others added 3 commits November 19, 2026 20:04
Bump multer, mysql2, lodash, nodemailer, sqlite3 and faker to patched
versions, override hugo-installer's semver, and add multer field limits
to the upload handler. Update seeded test expectations for faker 10.
nginx already caps the request size and buffers it before the app
reads it, and fieldNameSize matched busboy's default.
Regenerate the lockfile for this PR's version bumps now that main
commits package-lock.json (shift-org#1134); npm ci fails if package.json and
the lockfile disagree.

- multer ~2.5.0: fixes GHSA-q7qp-rjg7-q26m (DoS via a pending async
  fileFilter), which affects 2.0.0 - 2.4.0
- http-proxy-middleware ~3.0.11 (root and tools): fixes
  GHSA-gcq2-9pq2-cxqm and GHSA-64mm-vxmg-q3vj; dev-only (tools/preview.js)

npm audit: 2 remaining, both decompress via hugo-installer (build-time
only, no fixed release).
@onewheelskyward

Copy link
Copy Markdown
Contributor

Rebased onto main (which now commits package-lock.json, #1134) and force-pushed. Added one commit: a regenerated lockfile, multer ~2.5.0 (GHSA-q7qp-rjg7-q26m affects 2.0–2.4), and http-proxy-middleware ~3.0.11. npm audit is down to 2, both decompress via hugo-installer. If you have the branch locally, git fetch && git reset --hard origin/issue-1118-npm-audit.

hugo-installer's audit findings (semver 7.3.x, decompress) will be
handled separately, along with replacing or upgrading hugo-installer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address npm audit vulnerabilities (nodemailer, multer, express deps)

3 participants