{"answers":{"affected":"2 open source packages ship an affected version, including qs.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-8723 exists.","fix":"Upgrade qs to 6.15.2 or later.","what":"CVE-2026-8723 is a medium-severity vulnerability in ljharb qs, published on 16 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-8723 and fix it if it is affected.\n\nWhat it is: CVE-2026-8723 is a medium-severity vulnerability in ljharb qs, published on 16 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-8723 exists.\n\nAffected packages and fixed versions:\n- qs (npm): affected from 6.11.1; fixed in 6.15.2\n- qs (npm): affected from 6.11.1; fixed in 6.15.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-8723/ (Markdown: https://insights.sbomify.com/CVE-2026-8723/index.md)","id":"CVE-2026-8723","markdown":"https://insights.sbomify.com/CVE-2026-8723/index.md","name":"CVE-2026-8723","record":{"aliases":["AZL-87105","AZL-87108","CLEANSTART-2026-BN31244","CLEANSTART-2026-LT80709","CLEANSTART-2026-PI13683","CLSA-2026-1788262760","CLSA-2026-1790522895","DEBIAN-CVE-2026-8723","ECHO-e762-1cac-edb3","GHSA-q8mj-m7cp-5q26","MINI-226m-j5pp-4p6m","MINI-2c3v-8hmv-c339","MINI-2r43-gqwr-3hm3","MINI-4ggx-9fqw-8p2x","MINI-6269-mr46-993x","MINI-6g72-hgcj-w7gp","MINI-78f8-f3wj-wmx2","MINI-948r-mgw8-9fqw","MINI-9g93-x783-hx33","MINI-c3r8-2jfw-48h5","MINI-chq3-3635-9g65","MINI-f52h-rgh6-g8x5","MINI-fh6h-h99h-2jv2","MINI-fp4j-g7xh-995v","MINI-g96m-q9vg-c6rh","MINI-gg4w-w3h6-8xw8","MINI-gx5c-79v7-8gh9","MINI-hwmg-vh73-j3mr","MINI-p4rh-6vcj-wwgf","MINI-pffc-r47w-fp9m","MINI-q38p-hhfq-9h6q","MINI-qxp9-qjwg-j5j6","MINI-rgvc-vxrg-637w","MINI-rqj6-c2xh-96fg","MINI-rxm5-f3v9-j6xh","MINI-vj4j-fcj6-h9f8","MINI-vjjr-3gh4-v7c4","MINI-vp8h-fcp9-9vc3","MINI-vxgq-jc38-93g5","MINI-vxp5-64g7-3ppp","MINI-xwmj-gqqg-jhfr","RHSA-2026:33521","ROOT-APP-NPM-CVE-2026-8723","UBUNTU-CVE-2026-8723"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"JavaScript query string library","requires_auth":"none","summary":"Attackers can cause a denial of service by triggering a TypeError in the qs library when stringifying arrays with null values under specific encoding options.","user_interaction":"not_required","vuln_class":"null_dereference"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"harborist","cpe":[],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"description":"### Summary\n\n`qs.stringify` throws `TypeError` when called with `arrayFormat: 'comma'` and `encodeValuesOnly: true` on an array containing `null` or `undefined`. The throw is synchronous and not handled by any of qs's null-related options (`skipNulls`, `strictNullHandling`).\n\n### Details\n\nIn the comma + `encodeValuesOnly` branch, `lib/stringify.js:145` mapped the array through the raw encoder before joining:\n\n```js\n\nobj = utils.maybeMap(obj, encoder);\n\n```\n\n`utils.encode` (`lib/utils.js:195`) reads `str.length` with no null guard, so a `null` or `undefined` element throws `TypeError`. `skipNulls` and `strictNullHandling` are both checked in the per-element loop below this line and never get a chance to run.\n\nSame class of bug as the filter-array path fixed in 0c180a4. The vulnerable shape of the comma + `encodeValuesOnly` branch was introduced in 4c4b23d (\"encode comma values more consistently\", PR #463, 2023-01-19), first released in v6.11.1.\n\n#### PoC\n\n```js\n\nconst qs = require('qs');\n\nqs.stringify({ a: [null, 'b'] },      { arrayFormat: 'comma', encodeValuesOnly: true });\n\nqs.stringify({ a: [undefined, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true });\n\nqs.stringify({ a: [null] },           { arrayFormat: 'comma', encodeValuesOnly: true });\n\n// TypeError: Cannot read properties of null (reading 'length')\n\n//     at encode (lib/utils.js:195:13)\n\n//     at Object.maybeMap (lib/utils.js:322:37)\n\n//     at stringify (lib/stringify.js:145:25)\n\n```\n\n#### Fix\n\n`lib/stringify.js:145`, applied in 21f80b3 on `main` and released as v6.15.2:\n\n```diff\n\n- obj = utils.maybeMap(obj, encoder);\n\n+ obj = utils.maybeMap(obj, function (v) {\n\n+     return v == null ? v : encoder(v);\n\n+ });\n\n```\n\n`null` and `undefined` now pass through `maybeMap` unchanged and reach the `join(',')` step as-is. For `{ a: [null, 'b'] }` this produces `a=,b`, matching the non-`encodeValuesOnly` comma path (which already joins before encoding and produces `a=%2Cb` for the same input). Single-element `[null]` arrays still collapse via the existing `obj.join(',') || null` and remain subject to `skipNulls` / `strictNullHandling` in the main loop.\n\n### Affected versions\n\n`\u003e=6.11.1 \u003c6.15.2` — fixed in v6.15.2.\n\nThe vulnerable code shape was introduced in 4c4b23d and first shipped in v6.11.1. Earlier versions — including all of 6.7.x, 6.8.x, 6.9.x, 6.10.x, and 6.11.0 — implemented the comma + `encodeValuesOnly` path differently (joining before encoding) and are not affected. Empirically verified across released versions.\n\n### Impact\n\nApplication code that calls `qs.stringify` with both `arrayFormat: 'comma'` and `encodeValuesOnly: true` (both non-default) on input that may contain a `null` or `undefined` array element will throw synchronously instead of producing a query string. In a typical Node.js HTTP framework (Express, Fastify, Koa, hapi) the sync throw is caught by the framework's error boundary and the affected request returns a 500; the worker process does not exit and subsequent requests are unaffected. The \"kills the worker process\" framing applies only to call sites outside a request-handler error boundary (background jobs, startup paths, stream pipelines) or to deployments with framework error handling explicitly disabled.\n\nThe vulnerable input is a `null` or `undefined` entry inside an array; this is reachable from JSON request bodies or from application code constructing arrays from user input, but not from standard HTML form submissions (which produce strings or omitted fields, not literal `null`).","ecosystems":["Red Hat:hummingbird:1","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"qs.stringify crashes on null/undefined entries in comma-format arrays under encodeValuesOnly","id":"CVE-2026-8723","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"null_dereference","year":"2026"},"n_packages":16,"n_references":2,"next":{"headline":"Dataease Data Dashboard SqlparserUtils.java SqlparserUtils.transFilter sql injection","id":"CVE-2026-8724"},"packages":[{"ecosystem":"npm","fixed":["6.15.2"],"introduced":["6.11.1"],"last_affected":[],"package":"qs","purl":null,"source":"GHSA-q8mj-m7cp-5q26"},{"ecosystem":"npm","fixed":["6.15.2"],"introduced":["6.11.1"],"last_affected":[],"package":"qs","purl":"pkg:npm/qs","source":"GHSA-q8mj-m7cp-5q26"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14","purl":"pkg:rpm/redhat/python3.14","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-debug","purl":"pkg:rpm/redhat/python3.14-debug","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-devel","purl":"pkg:rpm/redhat/python3.14-devel","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading","purl":"pkg:rpm/redhat/python3.14-freethreading","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading-debug","purl":"pkg:rpm/redhat/python3.14-freethreading-debug","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading-devel","purl":"pkg:rpm/redhat/python3.14-freethreading-devel","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading-idle","purl":"pkg:rpm/redhat/python3.14-freethreading-idle","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading-libs","purl":"pkg:rpm/redhat/python3.14-freethreading-libs","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading-test","purl":"pkg:rpm/redhat/python3.14-freethreading-test","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-freethreading-tkinter","purl":"pkg:rpm/redhat/python3.14-freethreading-tkinter","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-idle","purl":"pkg:rpm/redhat/python3.14-idle","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-libs","purl":"pkg:rpm/redhat/python3.14-libs","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-test","purl":"pkg:rpm/redhat/python3.14-test","source":"RHSA-2026:33521"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.14.6-1.1.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.14-tkinter","purl":"pkg:rpm/redhat/python3.14-tkinter","source":"RHSA-2026:33521"}],"prev":{"headline":"Net::Async::Statsd::Client versions through 0.005 for Perl allow metric injections","id":"CVE-2026-8722"},"products":["qs"],"published":"2026-05-16","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-18","vendors":["ljharb"]},"summary":"Attackers can cause a denial of service by triggering a TypeError in the qs library when stringifying arrays with null values under specific encoding options.","url":"https://insights.sbomify.com/CVE-2026-8723/"}