Vulnerability
CVE-2026-82417
### Summary `qs.stringify` throws a `TypeError` when it serializes an object whose own `constructor` property has a truthy, non-callable `isBuffer` member. `utils.isBuffer` duck-types buffers by calling `obj.constructor.isBuffer(obj)` after checking only that the property is truthy, so a value such as `{ constructor: { isBuffer: "x" } }` makes the call throw `TypeError: obj.constructor.isBuffer is not a function`. ### Details `lib/stringify.js:127` calls `utils.isBuffer` on every non-primitive value it serializes. `utils.isBuffer` (`lib/utils.js:332`) reads `obj.constructor.isBuffer` and invokes it without verifying that it is a function. `constructor` and `isBuffer` are ordinary property names, so any object carrying them as own properties reaches the unchecked call. Such an object can be built from untrusted input. `qs.parse("x[constructor][isBuffer]=y", { plainObjects: true })` or `{ allowPrototypes: true }` keeps the `constructor` key as an own property (the default parse options drop it), and `JSON.parse("{\"a\":{\"constructor\":{\"isBuffer\":\"x\"}}}")` produces the same shape with no qs option involved. Express 4 with its default `query parser` setting and body-parser with `extended: true` both call `qs.parse` with `allowPrototypes: true`, so on those stacks `req.query` and `req.body` can carry the shape directly. #### PoC ```js var qs = require("qs"); qs.stringify(qs.parse("x[constructor][isBuffer]=y", { plainObjects: true })); qs.stringify(JSON.parse("{\"a\":{\"constructor\":{\"isBuffer\":\"x\"}}}")); // TypeError: obj.constructor.isBuffer is not a function // at Object.isBuffer (lib/utils.js:332:78) // at stringify (lib/stringify.js:127:45) ``` #### Fix `lib/utils.js`, applied in e83d321 on `main` and released as v6.16.0: ```diff - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); + return !!(obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj)); ``` Real `Buffer`, `safer-buffer`, and browserify `buffer` polyfill instances serialize exactly as before; only the throw is removed. ### Affected versions `>=2.2.5 <6.16.0`, fixed in v6.16.0. The unguarded duck-type was introduced in 3768a75 and first shipped in v2.2.5 (September 2014). v2.2.4 and earlier used `Buffer.isBuffer` and are not affected. Every release from v2.2.5 through v6.15.3 contains the unguarded call. ### Impact An unauthenticated request can make any code path that re-serializes attacker-influenced data with `qs.stringify` (for example, rebuilding a query string from `req.query` for a redirect or an upstream request, or serializing a parsed JSON body) throw synchronously. In a typical Node.js HTTP framework the throw is caught by the framework error boundary and the affected request returns a 500; the process survives and other requests are unaffected. Where the call runs outside an error boundary, such as an `async` Express 4 handler (where the throw becomes an unhandled promise rejection) or a background job, the process exits, so the impact in that case depends on the application error handling rather than on qs.
293 advisories report this vulnerability, across 10 ecosystems.
Advisories
-
AZL-98331
CVE-2026-82417 affecting package js-jquery 3.5.0-4
-
AZL-98334
CVE-2026-82417 affecting package nodejs-nodemon 2.0.3-5
-
AZL-98397
CVE-2026-82417 affecting package python-tensorboard 2.16.2-6
- CGA-224r-5g49-297c
- CGA-22fh-7pjw-3f3f
- CGA-2355-wrj5-pm8f
- CGA-23p9-g9c5-j848
- CGA-24cr-fcrp-5c6r
- CGA-27q4-4hw4-pwhp
- CGA-28qx-25jp-9h93
- CGA-2g7c-w4gj-fvpj
- CGA-2hjj-c645-m6xv
- CGA-2mjm-xqw8-hr4v
- CGA-2qfx-xhjw-rvjv
- CGA-2rrr-44gx-v6vq
- CGA-2w4p-8328-8fpp
- CGA-2wwm-q4p2-hhc2
- CGA-2x54-9wch-2v55
- CGA-2x8r-6r3h-2335
- CGA-349c-qr3p-327h
- CGA-35pc-pr39-6r4g
- CGA-36m2-3q79-rpx9
- CGA-36r6-4hwh-8828
- CGA-375m-2gch-8jvw
- CGA-37v5-3g2q-h265
- CGA-3c5m-98mm-vrh2
- CGA-3f58-rc5w-6v83
- CGA-3h6j-7mfm-48pp
- CGA-3pm6-3xj3-f2mp
- CGA-3q7g-5w2h-j42x
- CGA-3x57-2p4m-3xj7
- CGA-45fv-6hvc-93fg
- CGA-46w4-fp7x-p6h9
- CGA-4765-v5rc-8p6v
- CGA-4c2w-jcq3-7x8q
- CGA-4g27-m3rw-vpf3
- CGA-4h84-j855-588c
- CGA-4hvr-x3xh-444j
- CGA-4j6v-4gpw-847f
- CGA-4rm9-pfv7-gg8c
- CGA-4v78-3659-mqf7
- CGA-4w8j-mjg4-rh7x
- CGA-4x23-65f8-mw28
- CGA-549p-gr7f-5rf7
- CGA-59m2-f786-8p4f
- CGA-5f6g-8328-49xx
- CGA-5f83-p2pf-x5gg
- CGA-5gp3-9h9v-jcm7
- CGA-5jr7-2c4j-c5rv
- CGA-5pch-9hg7-25pq
- CGA-5q74-mhw4-x7w8
- CGA-5r4w-4wp7-7q43
- CGA-626v-rp7m-c3fj
- CGA-62cq-7w7m-mcvg
- CGA-62j6-87rg-hfh6
- CGA-637g-72cm-vv9q
- CGA-637g-v6vm-m63p
- CGA-665m-g3q4-82cq
- CGA-66c4-2rmc-w969
- CGA-6743-6wjh-h8fw
- CGA-6c2g-fvwv-4226
- CGA-6cfm-4v6c-rpm2
- CGA-6pgp-xh47-9r6p
- CGA-6rvc-97w7-4xc7
- CGA-6vq4-7vch-v6qm
- CGA-6w5j-jgrq-f8q4
- CGA-6xff-v2m6-chh2
- CGA-726f-f7hh-hhhq
- CGA-732m-39hj-fr78
- CGA-76wp-2hh3-7pf9
- CGA-7799-cr36-52w2
- CGA-77cq-67r3-3c7f
- CGA-77wm-g823-8fw6
- CGA-797q-5835-542q
- CGA-799x-wg93-mfx7
- CGA-7ff2-8wgw-jcmq
- CGA-7g85-pcpq-5p37
- CGA-7hrj-pqv6-v749
- CGA-7qw7-85wv-5j9q
- CGA-7v8x-rw3c-h2h6
- CGA-7w6q-4j3m-77vj
- CGA-836v-23c6-977v
- CGA-84g9-4chx-7763
- CGA-87c9-g89v-8g96
- CGA-87ff-gcrp-c563
- CGA-8c3g-8qgx-gw2p
- CGA-8hp5-pq6c-5v2f
- CGA-8m82-fhw6-cg78
- CGA-8mg3-2gf5-4v3h
- CGA-8rvh-ch3v-23q9
- CGA-8rxp-rxq6-r3q5
- CGA-8wq2-g269-x3r2
- CGA-8x5r-qwj3-q87j
- CGA-93wc-94h5-8856
- CGA-947r-4r6p-7wgj
- CGA-9659-m2qv-h5xg
- CGA-977m-2wqf-7cwv
- CGA-99f6-9rfr-rq4f
- CGA-9c3p-hw2x-c99m
- CGA-9ch5-fvx5-hxjh
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-82417.