Vulnerability
CVE-2026-110816
### Summary `qs.stringify` with `arrayFormat: 'comma'` throws `TypeError: Cannot convert object to primitive value` when an array element cannot be coerced to a string, such as an object with an own non-callable `toString` (`{ "toString": "x" }`) or a null-prototype object. The comma format joins array elements with `Array.prototype.join` and, under `encodeValuesOnly`, first passes each element through `String()` in `utils.encode`; neither guards against an element whose string coercion fails. ### Details In `lib/stringify.js`, the comma branch collapses the array with `obj.join(',')`. For an element whose own `toString` is not callable, `ToPrimitive` skips it, falls through to `Object.prototype.valueOf` (which returns the object itself), and throws. Under `encodeValuesOnly: true`, the same element first reaches `String(str)` in `utils.encode` (`lib/utils.js`) and throws there. Nested arrays (`{ "a": [[{ "toString": "x" }]] }`) throw the same way, through `Array.prototype.toString`. The `indices`, `brackets`, and `repeat` formats walk into object elements instead of coercing them, and are not affected. Such elements can come from untrusted input. `JSON.parse` produces `{ "a": [{ "toString": "x" }] }` with no qs option involved. `qs.parse("a[0][toString]=x", { allowPrototypes: true })` keeps the `toString` key, and `qs.parse("a[][b]=c", { plainObjects: true })` produces a null-prototype element; the default parse options drop `toString` and produce ordinary objects, which do not throw. Express 4's default `query parser`, Express 5's `extended` query parser, and body-parser's `urlencoded({ extended: true })` all call `qs.parse` with `allowPrototypes: true`. #### PoC ```js var qs = require("qs"); qs.stringify(JSON.parse("{\"a\":[{\"toString\":\"x\"}]}"), { arrayFormat: "comma" }); qs.stringify(qs.parse("a[0][toString]=x", { allowPrototypes: true }), { arrayFormat: "comma" }); qs.stringify(qs.parse("a[][b]=c", { plainObjects: true }), { arrayFormat: "comma", encodeValuesOnly: true }); // TypeError: Cannot convert object to primitive value ``` #### Fix Applied in a952e75 on `main` and released as v6.16.1: an element whose string coercion would fail is coerced to its primitive `valueOf`, if any, or else to `Object.prototype.toString`, so it renders as `[object Object]`, the same as any other object element already does under the comma format. Nested arrays are walked the way `join` walks them. Every input that did not previously throw serializes exactly as before, and a `toString` or `valueOf` that itself throws still propagates. ### Affected versions `>=6.7.0 <6.16.1`, fixed in v6.16.1. The `join` path was introduced with the comma format in b84acba and first shipped in v6.7.0; v6.6.x and earlier ignore `arrayFormat: 'comma'` and are not affected. The `encodeValuesOnly` `String()` site was introduced in 4c4b23d (v6.11.1); before that, the same input throws at `join`. Every release from v6.7.0 through v6.16.0 is affected. ### Impact An unauthenticated request can make any code path that re-serializes attacker-influenced data with `qs.stringify` and `arrayFormat: 'comma'` (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 bare `http` request handler, the process exits, so the impact in that case depends on the application error handling rather than on qs. The default `arrayFormat` (`indices`) is not affected.
112 advisories report this vulnerability, across 9 ecosystems.
Advisories
-
AZL-108309
CVE-2026-110816 affecting package js-jquery 3.5.0-4
-
AZL-108477
CVE-2026-110816 affecting package python-tensorboard 2.16.2-6
- CGA-24m4-4343-h98m
- CGA-24pp-7wmc-hw4h
- CGA-293q-g29f-2rjv
- CGA-2cw3-ff84-q3j9
- CGA-2ph8-3jr8-c6q4
- CGA-2r9h-5f7j-3pwv
- CGA-337h-wxcm-fg83
- CGA-34fx-6mr5-r994
- CGA-3828-q5q7-cf85
- CGA-3hpx-6r77-hh5x
- CGA-3vm2-v959-r33v
- CGA-3xq9-rxch-fpqh
- CGA-42pr-p8pc-wcrj
- CGA-434v-66c2-pc34
- CGA-468h-wr4c-pc32
- CGA-4cww-2fph-cf7j
- CGA-4hhx-66vp-3r3q
- CGA-4r7p-78r9-2m3c
- CGA-54r8-3rgg-vcfw
- CGA-54rq-c3vh-f3ff
- CGA-5h4f-wr2q-jq87
- CGA-5qh8-4hvf-8mfw
- CGA-62pj-6898-mc33
- CGA-65jr-585p-v6jv
- CGA-6652-2cvf-72r3
- CGA-668h-f98v-x3c3
- CGA-66h7-hv5g-9m6p
- CGA-68rw-85gr-hv7w
- CGA-6r96-f546-xhpr
- CGA-6rx7-g5gw-h29v
- CGA-6vpg-pjjc-8pxr
- CGA-6w4g-f6xc-28gj
- CGA-73xx-wg55-qvh8
- CGA-74jh-hpgm-mjqc
- CGA-7527-xx58-8pf7
- CGA-75g8-x3r3-9m45
- CGA-7cm4-6jw8-p27c
- CGA-7g9q-v8jr-mmqf
- CGA-7q5g-9f2c-rr56
- CGA-7wm7-9xgc-vmfh
- CGA-85hq-796f-99gh
- CGA-8g49-qm6c-q9wm
- CGA-8h5f-69ch-cxfc
- CGA-8h68-8jrh-7wh8
- CGA-926p-cvr6-4h56
- CGA-96mw-7p8j-p9gx
- CGA-97vf-q7rx-5vgq
- CGA-9jg4-j63w-h94r
- CGA-9q48-w62j-xwjf
- CGA-9whv-8397-6f2h
- CGA-c2jp-j5fj-r3j3
- CGA-c9cv-jf94-29c6
- CGA-f4pj-ghfj-5w5h
- CGA-f8gp-jjfx-hm7h
- CGA-f95x-9hpw-6x7p
- CGA-ff75-2pcg-r5gm
- CGA-fggv-cpf3-8m6j
- CGA-fq4g-xfmp-6g7x
- CGA-fv62-fffv-9652
- CGA-fx59-5p34-24wc
- CGA-fxfr-vp6q-868c
- CGA-g62g-6r2m-8c2x
- CGA-ggqw-28cp-jmx6
- CGA-gh3w-gc45-vg97
- CGA-gq5f-43pw-r9j5
- CGA-gvrm-6gqr-qcq9
- CGA-h8gp-2pww-2qjg
- CGA-hjrx-m696-23mg
- CGA-hpvj-hhgx-6chq
- CGA-j64q-g749-6f89
- CGA-j859-h2wg-xmj4
- CGA-jfg4-pp4c-896r
- CGA-jgq7-p7v3-h3p9
- CGA-jr3v-pxj9-j9vr
- CGA-m55h-3mp5-f4m6
- CGA-m5fr-cfm8-vcw8
- CGA-mfrg-932v-j57v
- CGA-mr35-23f5-pprw
- CGA-p848-vf8j-2hj7
- CGA-p9jr-gj27-qh3j
- CGA-q3cc-78hg-f8q4
- CGA-q9wg-phj4-8rr6
- CGA-qff6-xh57-w7p4
- CGA-qfqm-6pxr-grr7
- CGA-qv9f-4gfh-qgw8
- CGA-r259-qjmh-3594
- CGA-r279-57v5-m9q5
- CGA-rgrf-c53h-286p
- CGA-v5m9-h872-jmr2
- CGA-v5xx-69xx-fc5m
- CGA-v7mh-g3jf-p77m
- CGA-vcw7-93x5-h4ww
- CGA-vp22-r4v4-v42m
- CGA-vrww-82jp-h9vf
- CGA-w8wc-mr8h-c2vp
- CGA-x9m7-mpfp-8w73
- CGA-xfmj-7cm5-c2gx
- CGA-xp88-vq4r-f2wh
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-110816.