Impact
The library qs uses arrayFormat 'comma' to join array elements with Array.prototype.join. When an element has a non‑callable toString, string conversion can fail, causing a TypeError that propagates out of qs.stringify. This synchronous failure interrupts any code that re‑serializes attacker‑controlled data—such as rebuilding query strings, forwarding data to upstream services, or serializing parsed JSON—resulting in an HTTP 500 error or, if unhandled, a process exit. The flaw enables denial of service but not code execution, and maps to CWE-248 (Incorrect Type Conversion) and CWE-704 (Incorrect Type Conversion).
Affected Systems
The vulnerability exists in the Node.js query string library qs, maintained by ljharb. Versions from 6.7.0 through 6.16.0 are affected; earlier 6.6.x releases and any version older than 6.7.0 are not impacted. Because qs is widely used by Express (4 and 5), body-parser and other Node frameworks, any application that pulls in an affected qs release and uses arrayFormat: 'comma' is potentially vulnerable.
Risk and Exploitability
The CVSS score is 6.3 (medium), the EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. An attacker can trigger the fault by sending a crafted URL or request body that includes an array element with an invalid toString, such as ?a[0][toString]=x or a JSON body that parses to an object whose toString property is a string. In many frameworks the error is caught and results in a 500 response; in others the exception propagates as an unhandled promise rejection or directly crashes a bare http handler. This makes the risk moderate, limited to loss of availability in the affected request path and dependent on the application’s error handling.
OpenCVE Enrichment