{"id":"DHI-iuqm-fs2t-5bag-vpb3","aliases":[],"title":"### Summary","originalDescription":"### 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\": [{ \"t","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":null,"exploitDb":null},"affected":[{"ecosystem":"Docker Hardened Images:Debian:13","name":"grist","range":">=0, <1.7.21-5","fixed":"1.7.21-5"},{"ecosystem":"Docker Hardened Images:Debian:13","name":"grist","range":">=1.7.21-9, <1.7.22-2","fixed":"1.7.22-2"}],"references":[{"url":"https://scout.docker.com/v/DHI-iuqm-fs2t-5bag-vpb3","type":"advisory"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-110816","type":"advisory"},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-110816","type":"advisory"},{"url":"https://github.com/advisories/GHSA-6pq8-jhm2-2vcw","type":"advisory"},{"url":"https://github.com/ljharb/qs/security/advisories/GHSA-6pq8-jhm2-2vcw","type":"advisory"},{"url":"https://github.com/ljharb/qs/commit/a952e7519338ef0cfb25694a2988848f93333727","type":"fix"},{"url":"https://github.com/ljharb/qs/releases/tag/v6.16.1","type":"web"},{"url":"https://access.redhat.com/security/cve/CVE-2026-110816","type":"advisory"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-110816","type":"fix"},{"url":"https://ubuntu.com/security/CVE-2026-110816","type":"advisory"},{"url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-110816","type":"advisory"}],"sources":[{"name":"osv","at":"2026-12-03T17:35:27.628Z","url":"https://osv.dev/vulnerability/DHI-iuqm-fs2t-5bag-vpb3","license":"CC-BY 4.0","firstSeenAt":"2026-11-20T04:52:02.242Z"}],"firstSeenAt":"2026-11-20T04:52:02.242Z","publishedAt":"2026-11-20T04:21:01.000Z","modifiedAt":"2026-12-03T17:16:15.246Z"}