Skip to content

deps: qs@~6.16.0 - #7440

Merged
bjohansebas merged 2 commits into
expressjs:4.xfrom
lazerg:fix/issue-7439-qs-6.16.0
Sep 11, 2026
Merged

deps: qs@~6.16.0#7440
bjohansebas merged 2 commits into
expressjs:4.xfrom
lazerg:fix/issue-7439-qs-6.16.0

Conversation

@lazerg

@lazerg lazerg commented Sep 1, 2026

Copy link
Copy Markdown

4.x declares qs as ~6.15.1, which caps at 6.15.3. Both CVE-2026-82417 (GHSA-4mjr-xmp4-gh2g, affects >= 2.2.5, <= 6.15.3) and CVE-2026-82562 (GHSA-x5fp-wj9c-mxmx, affects >= 6.14.2, <= 6.15.3) are patched in qs@6.16.0, so a fresh npm install express@4.22.2 still lands on a vulnerable qs.

Neither advisory is triggerable through Express itself. Express only calls qs.parse, and the first one needs qs.stringify. The second needs comma: true together with throwOnLimitExceeded: true, which Express never sets. The bump still moves the shipped qs to a version scanners do not flag.

Both advisories are recent enough that they haven't reached the feed npm audit reads, so it still reports 0 vulnerabilities here. The GHSA pages carry the affected ranges.

body-parser@1.20.8 now declares qs: ~6.16.0 and satisfies Express's own ~1.20.5 pin, so a fresh install already gets a clean qs tree without any change here.

Refs #7439

@socket-security

socket-security Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​qs@​6.16.010010010094100

View full report

@krzysdz

krzysdz commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The first one is reachable through the extended query parser, since parseExtendedQueryString in lib/utils.js passes allowPrototypes: true.

GHSA-4mjr-xmp4-gh2g affects qs.stringify(), so it's not really reachable through Express, which uses only the parser. The reference to allowPrototypes: true is there, because this option is necessary to construct an object that can trigger the DoS (unexpected error) when using qs.parse() -> qs.stringify() round trip.

This covers the direct dependency only. body-parser@1.20.6, which is what ~1.20.5 resolves to, still declares qs: ~6.15.1 of its own, so its nested copy stays on 6.15.3 until that repo bumps too.

expressjs/body-parser#761

@lazerg

lazerg commented Sep 1, 2026

Copy link
Copy Markdown
Author

You're right, and I dropped that line from the description. Express only calls qs.parse, so the stringify issue sits outside its path. The arrayLimit bypass needs comma: true with throwOnLimitExceeded: true, which Express never sets either. Grepping the tree, the only qs.stringify callers are superagent and formidable, both test-only.

So this is a bump of the shipped dependency, not a patch for a live hole in 4.x. The description says that now, and points at expressjs/body-parser#761 for the nested copy.

matz3 added a commit to SAP/ui5-cli that referenced this pull request Sep 7, 2026
Consumers who installed @ui5/cli and ran "npm ci" got:

  npm error Missing: qs@6.15.3 from lock file

The "overrides" entry forced a single qs@6.16.0 across the bundled
express/body-parser tree at pack time. Overrides are producer-only, so
consumers re-resolve without them, expect qs@6.15.3, and the lockfile no
longer matches, breaking "npm ci".

The GHSA-x5fp-wj9c-mxmx / GHSA-4mjr-xmp4-gh2g qs vulnerability that the
override addressed is not applicable to the way express / body-parser use
qs, so removing the override does not expose us to it.

Upstream fixes are in progress but not yet consumable: the qs bumps are
still open pull requests, not merged or released, so we cannot rely on the
transitive dependencies alone yet:

  expressjs/express#7440
  expressjs/body-parser#761

Dropping the override lets qs resolve naturally and keeps package.json and
package-lock.json in sync.
@krzysdz

krzysdz commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

body-parser@1.20.8 was released and includes the qs version bump. 1.20.8 is compatible with ~1.20.5 specified in package.json, so updating it is not necessary.

@lazerg

lazerg commented Sep 11, 2026

Copy link
Copy Markdown
Author

Confirmed: body-parser@1.20.8 ships qs@~6.16.0 and it satisfies our ~1.20.5 pin. I updated the PR body to drop the stale nested-dependency note. No package.json change needed here.

@bjohansebas
bjohansebas merged commit 4138650 into expressjs:4.x Sep 11, 2026
53 checks passed
@UlisesGascon UlisesGascon mentioned this pull request Sep 11, 2026
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.

3 participants