CVE-2026-8723 json
qs.stringify crashes on null/undefined entries in comma-format arrays under encodeValuesOnly
published 2026-05-16 5 mo ago modified 2026-10-23 16 d ago also GHSA-q8mj-m7cp-5q26 , EUVD-2026-30674
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 34%
- public exploits
- 0
- none known
Summary
### Summary
`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`).
### Details
In the comma + `encodeValuesOnly` branch, `lib/stringify.js:145` mapped the array through the raw encoder before joining:
```js
obj = utils.maybeMap(obj, encoder);
```
`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.
Same 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.
#### PoC
```js
const qs = require('qs');
qs.stringify({ a: [null, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true });
qs.stringify({ a: [undefined, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true });
qs.stringify({ a: [null] }, { arrayFormat: 'comma', encodeValuesOnly: true });
// TypeError: Cannot read properties of null (reading 'length')
// at encode (lib/utils.js:195:13)
// at Object.maybeMap (lib/utils.js:322:37)
// at stringify (lib/stringify.js:145:25)
```
#### Fix
`lib/stringify.js:145`, applied in 21f80b3 on `main` and released as v6.15.2:
```diff
- obj = utils.maybeMap(obj, encoder);
+ obj = utils.maybeMap(obj, function (v) {
+ return v == null ? v : encoder(v);
+ });
```
`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.
### Affected versions
`>=6.11.1 <6.15.2` — fixed in v6.15.2.
The 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.
### Impact
Application 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.
The 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`).
Patch / fix
- npm qs 6.15.2
- ljharb qs 6.15.2
- node-qs Debian 14 6.15.2+ds+~6.15.1-1
debian advisories DEBIAN-CVE-2026-8723
- python3.14 hummingbird 1 3.14.6-1.1.hum1
- python3.14-idle hummingbird 1 3.14.6-1.1.hum1
- python3.14-libs hummingbird 1 3.14.6-1.1.hum1
- python3.14-test hummingbird 1 3.14.6-1.1.hum1
- python3.14-tkinter hummingbird 1 3.14.6-1.1.hum1
- python3.14-freethreading hummingbird 1 3.14.6-1.1.hum1
- python3.14-freethreading-idle hummingbird 1 3.14.6-1.1.hum1
- python3.14-freethreading-libs hummingbird 1 3.14.6-1.1.hum1
red hat advisories RHSA-2026:33521RHSA-2026:38091RHSA-2026:17682RHSA-2026:9455
- github.com/ljharb/qs@21f80b3 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-8723 updated cvss 5.3
qs: qs: Denial of Service due to improper handling of null/undefined array elements
-
Red Hat Confidential Compute Attestation openshift-sandboxed-containers/osc-pccs Red Hat Cryostat 4 qs, grafana-infinity-datasource-npm, cryostat-openshift-console-plugin-npm, cryostat/cryostat-openshift-console-plugin-rhel9 Red Hat Gatekeeper 3 gatekeeper/gatekeeper-rhel9 Red Hat Migration Toolkit for Applications 8 mta/mta-ui-rhel8, mta/mta-ui-rhel9, mta/mta-solution-server-rhel9 Red Hat Migration Toolkit for Containers rhmtc/openshift-migration-ui-rhel8 Red Hat Multicluster Engine for Kubernetes multicluster-engine/console-mce-rhel9affected: workaround, no fix available “Fix deferred”
+24 more productsfewer
Red Hat Node HealthCheck Operator workload-availability/node-remediation-console-rhel8, workload-availability/node-healthcheck-rhel9-operator, workload-availability/node-healthcheck-operator-bundle, workload-availability/node-healthcheck-must-gather-rhel9 Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-console-plugin-rhel9, openshift-lightspeed/lightspeed-console-plugin-419-rhel9, openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9 Red Hat OpenShift Pipelines openshift-pipelines/pipelines-hub-ui-rhel8, openshift-pipelines/pipelines-hub-ui-rhel9, openshift-pipelines/pipelines-console-plugin-rhel8, openshift-pipelines/pipelines-console-plugin-rhel9, openshift-pipelines/pipelines-console-plugin-pf5-rhel9 Red Hat OpenShift Serverless openshift-serverless-1/kn-eventing-integrations-log-sink-rhel9, openshift-serverless-1/kn-eventing-integrations-aws-s3-sink-rhel9, openshift-serverless-1/kn-eventing-integrations-aws-sns-sink-rhel9, openshift-serverless-1/kn-eventing-integrations-aws-sqs-sink-rhel9, openshift-serverless-1/kn-eventing-integrations-timer-source-rhel9, openshift-serverless-1/kn-eventing-integrations-aws-s3-source-rhel9, +3 more Red Hat OpenShift Service Mesh 2 openshift-service-mesh/kiali-rhel8, openshift-service-mesh/kiali-ossmc-rhel8 Red Hat OpenShift Service Mesh 3 openshift-service-mesh/kiali-rhel9, openshift-service-mesh/kiali-ossmc-rhel9, openshift-service-mesh/kiali-rhel9-operator, openshift-service-mesh/kiali-operator-bundle Red Hat 3scale API Management Platform 2 3scale-amp21/system, 3scale-amp22/system, 3scale-amp2/system-rhel7, 3scale-amp2/system-rhel8, 3scale-amp2/system-rhel9 Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/console-rhel9, rhacm2/volsync-rhel9, rhacm2/volsync-operator-bundle Red Hat Advanced Cluster Security 4 advanced-cluster-security/rhacs-main-rhel8 Red Hat AMQ Broker 7 qs Red Hat Ansible Automation Platform 2 ansible-automation-platform-26/gateway-rhel9, ansible-automation-platform-27/gateway-rhel9, ansible-automation-platform-24/lightspeed-rhel8, ansible-automation-platform-25/lightspeed-rhel8, ansible-automation-platform-26/lightspeed-rhel9, ansible-automation-platform-27/lightspeed-rhel9, +2 more Red Hat build of Apache Camel - HawtIO 4 qs Red Hat build of Apache Camel for Spring Boot 4 qs Red Hat Build of Podman Desktop rh-podman-desktop.git Red Hat Connectivity Link 1 rhcl-1/rhcl-console-plugin-rhel9 Red Hat Data Grid 8 qs Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9 Red Hat Discovery 2 discovery/discovery-ui-rhel9 Red Hat Enterprise Linux 7 firefox Red Hat Enterprise Linux 8 pcs, dotnet, grafana, mozjs60, pcs-snmp, dotnet8.0, +31 more Red Hat Enterprise Linux 9 gjs, pcs, firefox, sgx-mpa, tdx-qgs, pcs-snmp, +8 more Red Hat Enterprise Linux 10 gjs, firefox, linux-sgx, thunderbird Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/bootc-rocm-rhel9, rhelai3/bootc-gaudi-rhel9, rhelai3/disk-image-cuda-rhel9 Red Hat Fuse 7 qs -
Red Hat Hardened Images nodejs25affected: workaround, no fix planned “Will not fix”
-
Red Hat JBoss Enterprise Application Platform 7 qs Red Hat JBoss Enterprise Application Platform Expansion Pack qs Red Hat OpenShift AI (RHOAI) rhoai/odh-mlflow-rhel9, rhoai/odh-dashboard-rhel8, rhoai/odh-dashboard-rhel9, rhoai/odh-mod-arch-maas-rhel9, rhoai/odh-mod-arch-automl-rhel9, rhoai/odh-mod-arch-gen-ai-rhel9, +5 more Red Hat OpenShift Container Platform 4 openshift4/ose-console, openshift4/ose-console-rhel9, openshift4/ose-monitoring-plugin-rhel9, openshift4/ose-agent-installer-ui-rhel9 Red Hat OpenShift Container Platform 5 openshift5/ose-console-rhel9, openshift5/ose-monitoring-plugin-rhel9, openshift5/ose-agent-installer-ui-rhel9 Red Hat Openshift Data Foundation 4 odf4/mcg-core-rhel9affected: workaround, no fix available “Fix deferred”
+3 more productsfewer
Red Hat OpenShift Dev Spaces devspaces/code-rhel9, devspaces/openvsx-rhel9, devspaces/dashboard-rhel9, devspaces/jetbrains-ide-rhel9, devspaces/pluginregistry-rhel9 Red Hat OpenShift GitOps openshift-gitops-1/argocd-rhel8, openshift-gitops-1/argocd-rhel9 Red Hat OpenShift Virtualization 4 container-native-virtualization/kubevirt-console-plugin, container-native-virtualization/kubevirt-console-plugin-rhel9
5 more affected, 1 more fixed, 1 more not affected in the full advisory
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 5 mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 34% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/ljharb/qs/security/advisories/GHSA-q8mj-m7cp-5q26 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| CNA | 4.0 | 6.3 | 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 |
| CNA | 4.0 | 6.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | qs | >=6.11.1, <6.15.2 |
6.15.2 |
Affected products
- ljharb qs
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
References
-
github.com
/ljharb/qs/commit/21f80b33e5c8b3f7eba1034fff0da4a4a37a1d41
patch, web
-
github.com
/ljharb/qs/security/advisories/GHSA-q8mj-m7cp-5q26
vendor-advisory, exploit, web
-
nvd.nist.gov
/vuln/detail/CVE-2026-8723
advisory
-
github.com
/ljharb/qs
package
Sources
- CVE List CVE-2026-8723
- GitHub Advisory GHSA-q8mj-m7cp-5q26
- NVD CVE-2026-8723
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.