qs

Ecosystem: npm

Downloads: 864.17 Mln

Vulnerabilities from the last (months)
  • 0CriticalAffects 0 versions
  • 5HighAffects 16 versions
  • 0MediumAffects 0 versions
  • 5ModerateAffects 5 versions
  • 1LowAffects 1 version
Severity distribution (all time)
11vulnerabilities
  • Critical0 (0.0%)
  • High5 (45.5%)
  • Medium0 (0.0%)
  • Moderate5 (45.5%)
  • Low1 (9.1%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 2
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 1
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 2
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0

Vulnerabilities (11)

Known vulnerabilities affecting qs, based on data from OSV.

Vulnerabilities affecting qs
IDSeveritySummaryAffected versionsPublishedSource
GHSA-6pq8-jhm2-2vcwModerateqs : qs.stringify with arrayFormat 'comma' throws an uncaught TypeError on array elements carrying a non-callable own toString (DoS)## Summary `qs.stringify(obj, { arrayFormat: 'comma' })` throws an uncaught `TypeError: Cannot convert object to primitive value` when an array in `obj` contains an element that carries an own, non-callable `toString` property (for example `{ a: [ { toString: 'x' } ] }`). A remote, unauthenticated attacker who can influence an object that the application later re-serializes with the comma array format triggers the throw. In a service that lacks a synchronous error boundary around the serialization call, the uncaught exception crashes the worker process, producing a denial of service. ## Root
  • >= 6.7.0, < 6.16.1
GitHub (opens in a new tab)
GHSA-4mjr-xmp4-gh2gModerateqs: Denial of Service via Attacker Controlled isBuffer### Summary `qs.stringify()` calls `utils.isBuffer()` on every value it serializes, and `utils.isBuffer()` invokes `obj.constructor.isBuffer(obj)` without checking that it is callable. A value whose own `constructor.isBuffer` is a non-function makes `qs` call a non-callable and throw `TypeError`. Such a value is produced **by `qs.parse` itself** from an untrusted query string when `plainObjects: true` or `allowPrototypes: true` is set, so a pure-`qs` `parse` → `stringify` round-trip — no `JSON.parse` — turns an unauthenticated query string into an uncaught throw. An attacker-controlled `pars
  • >= 2.2.5, < 6.16.0
GitHub (opens in a new tab)
GHSA-x5fp-wj9c-mxmxModerateqs array-limit bypass via bracket-key comma parsing### Summary `qs` `v6.15.3` allows bracket-key input to bypass `arrayLimit` and `throwOnLimitExceeded` when `comma: true`. The input `a[]=1,2,3,4` succeeds with `arrayLimit: 3`, while the equivalent plain-key input is rejected. Affected version tested: ```text qs v6.15.3 commit 18d085e919dae70c8f1b200ab99323058edab2c2 ``` ### Details `parseArrayValue()` enforces the comma limit only for flat values. The `a[]` form is marked non-flat, so its comma-separated value is wrapped after parsing and the inner array is not checked. A single parameter can therefore materialize arbitrarily large array
  • >= 6.14.2, < 6.16.0
GitHub (opens in a new tab)
GHSA-q8mj-m7cp-5q26Moderateqs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/undefined entries in comma-format arrays when encodeValuesOnly is set### 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
  • >= 6.11.1, < 6.15.2
GitHub (opens in a new tab)
GHSA-w7fw-mjwx-w883Lowqs's arrayLimit bypass in comma parsing allows denial of service### Summary The `arrayLimit` option in qs does not enforce limits for comma-separated values when `comma: true` is enabled, allowing attackers to cause denial-of-service via memory exhaustion. This is a bypass of the array limit enforcement, similar to the bracket notation bypass addressed in GHSA-6rw7-vpxm-498p (CVE-2025-15284). ### Details When the `comma` option is set to `true` (not the default, but configurable in applications), qs allows parsing comma-separated strings as arrays (e.g., `?param=a,b,c` becomes `['a', 'b', 'c']`). However, the limit check for `arrayLimit` (default: 20) and
  • >= 6.7.0, < 6.14.2
GitHub (opens in a new tab)
GHSA-6rw7-vpxm-498pModerateqs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion### Summary The `arrayLimit` option in qs did not enforce limits for bracket notation (`a[]=1&a[]=2`), only for indexed notation (`a[0]=1`). This is a consistency bug; `arrayLimit` should apply uniformly across all array notations. **Note:** The default `parameterLimit` of 1000 effectively mitigates the DoS scenario originally described. With default options, bracket notation cannot produce arrays larger than `parameterLimit` regardless of `arrayLimit`, because each `a[]=value` consumes one parameter slot. The severity has been reduced accordingly. ### Details The `arrayLimit` option only
  • < 6.14.1
GitHub (opens in a new tab)
GHSA-hrpp-h998-j3ppHighqs vulnerable to Prototype Pollutionqs before 6.10.3 allows attackers to cause a Node process hang because an `__ proto__` key can be used. In many typical web framework use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as `a[__proto__]=b&a[__proto__]&a[length]=100000000`. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4.
  • >= 6.10.0, < 6.10.3
  • >= 6.9.0, < 6.9.7
  • >= 6.8.0, < 6.8.3
  • >= 6.7.0, < 6.7.3
  • >= 6.6.0, < 6.6.1
  • >= 6.5.0, < 6.5.3
  • >= 6.4.0, < 6.4.1
  • >= 6.3.0, < 6.3.3
  • < 6.2.4
GitHub (opens in a new tab)
GHSA-gqgv-6jq5-jjj9HighPrototype Pollution Protection Bypass in qsAffected version of `qs` are vulnerable to Prototype Pollution because it is possible to bypass the protection. The `qs.parse` function fails to properly prevent an object's prototype to be altered when parsing arbitrary input. Input containing `[` or `]` may bypass the prototype pollution protection and alter the Object prototype. This allows attackers to override properties that will exist in all objects, which may lead to Denial of Service or Remote Code Execution in specific circumstances. ## Recommendation Upgrade to 6.0.4, 6.1.2, 6.2.3, 6.3.2 or later.
  • < 6.0.4
  • >= 6.1.0, < 6.1.2
  • >= 6.2.0, < 6.2.3
  • >= 6.3.0, < 6.3.2
GitHub (opens in a new tab)
GHSA-crvj-3gj9-gm2pHighHigh severity vulnerability that affects qsWithdrawn, accidental duplicate publish. The qs module before 1.0.0 in Node.js does not call the compact function for array data, which allows remote attackers to cause a denial of service (memory consumption) by using a large index value to create a sparse array.
  • < 1.0.0
GitHub (opens in a new tab)
GHSA-f9cm-p3w6-xvr3HighDenial-of-Service Extended Event Loop Blocking in qsVersions prior to 1.0.0 of `qs` are affected by a denial of service vulnerability that results from excessive recursion in parsing a deeply nested JSON string. ## Recommendation Update to version 1.0.0 or later
  • < 1.0.0
GitHub (opens in a new tab)
  • GHSA-6pq8-jhm2-2vcwModerate
    qs : qs.stringify with arrayFormat 'comma' throws an uncaught TypeError on array elements carrying a non-callable own toString (DoS)
    • >= 6.7.0, < 6.16.1

    ## Summary `qs.stringify(obj, { arrayFormat: 'comma' })` throws an uncaught `TypeError: Cannot convert object to primitive value` when an array in `obj` contains an element that carries an own, non-callable `toString` property (for example `{ a: [ { toString: 'x' } ] }`). A remote, unauthenticated attacker who can influence an object that the application later re-serializes with the comma array format triggers the throw. In a service that lacks a synchronous error boundary around the serialization call, the uncaught exception crashes the worker process, producing a denial of service. ## Root

    CVE: CVE-2026-110816

  • GHSA-4mjr-xmp4-gh2gModerate
    qs: Denial of Service via Attacker Controlled isBuffer
    • >= 2.2.5, < 6.16.0

    ### Summary `qs.stringify()` calls `utils.isBuffer()` on every value it serializes, and `utils.isBuffer()` invokes `obj.constructor.isBuffer(obj)` without checking that it is callable. A value whose own `constructor.isBuffer` is a non-function makes `qs` call a non-callable and throw `TypeError`. Such a value is produced **by `qs.parse` itself** from an untrusted query string when `plainObjects: true` or `allowPrototypes: true` is set, so a pure-`qs` `parse` → `stringify` round-trip — no `JSON.parse` — turns an unauthenticated query string into an uncaught throw. An attacker-controlled `pars

    CVE: CVE-2026-82417

  • GHSA-x5fp-wj9c-mxmxModerate
    qs array-limit bypass via bracket-key comma parsing
    • >= 6.14.2, < 6.16.0

    ### Summary `qs` `v6.15.3` allows bracket-key input to bypass `arrayLimit` and `throwOnLimitExceeded` when `comma: true`. The input `a[]=1,2,3,4` succeeds with `arrayLimit: 3`, while the equivalent plain-key input is rejected. Affected version tested: ```text qs v6.15.3 commit 18d085e919dae70c8f1b200ab99323058edab2c2 ``` ### Details `parseArrayValue()` enforces the comma limit only for flat values. The `a[]` form is marked non-flat, so its comma-separated value is wrapped after parsing and the inner array is not checked. A single parameter can therefore materialize arbitrarily large array

    CVE: CVE-2026-82562

  • GHSA-q8mj-m7cp-5q26Moderate
    qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/undefined entries in comma-format arrays when encodeValuesOnly is set
    • >= 6.11.1, < 6.15.2

    ### 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

    CVE: CVE-2026-8723

  • GHSA-w7fw-mjwx-w883Low
    qs's arrayLimit bypass in comma parsing allows denial of service
    • >= 6.7.0, < 6.14.2

    ### Summary The `arrayLimit` option in qs does not enforce limits for comma-separated values when `comma: true` is enabled, allowing attackers to cause denial-of-service via memory exhaustion. This is a bypass of the array limit enforcement, similar to the bracket notation bypass addressed in GHSA-6rw7-vpxm-498p (CVE-2025-15284). ### Details When the `comma` option is set to `true` (not the default, but configurable in applications), qs allows parsing comma-separated strings as arrays (e.g., `?param=a,b,c` becomes `['a', 'b', 'c']`). However, the limit check for `arrayLimit` (default: 20) and

    CVE: CVE-2026-2391

  • GHSA-6rw7-vpxm-498pModerate
    qs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion
    • < 6.14.1

    ### Summary The `arrayLimit` option in qs did not enforce limits for bracket notation (`a[]=1&a[]=2`), only for indexed notation (`a[0]=1`). This is a consistency bug; `arrayLimit` should apply uniformly across all array notations. **Note:** The default `parameterLimit` of 1000 effectively mitigates the DoS scenario originally described. With default options, bracket notation cannot produce arrays larger than `parameterLimit` regardless of `arrayLimit`, because each `a[]=value` consumes one parameter slot. The severity has been reduced accordingly. ### Details The `arrayLimit` option only

    CVE: CVE-2025-15284

  • GHSA-hrpp-h998-j3ppHigh
    qs vulnerable to Prototype Pollution
    • >= 6.10.0, < 6.10.3
    • >= 6.9.0, < 6.9.7
    • +7 more
    Affected versions:
    • >= 6.10.0, < 6.10.3
    • >= 6.9.0, < 6.9.7
    • >= 6.8.0, < 6.8.3
    • >= 6.7.0, < 6.7.3
    • >= 6.6.0, < 6.6.1
    • >= 6.5.0, < 6.5.3
    • >= 6.4.0, < 6.4.1
    • >= 6.3.0, < 6.3.3
    • < 6.2.4

    qs before 6.10.3 allows attackers to cause a Node process hang because an `__ proto__` key can be used. In many typical web framework use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as `a[__proto__]=b&a[__proto__]&a[length]=100000000`. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4.

    CVE: CVE-2022-24999

  • GHSA-gqgv-6jq5-jjj9High
    Prototype Pollution Protection Bypass in qs
    • < 6.0.4
    • >= 6.1.0, < 6.1.2
    • +2 more
    Affected versions:
    • < 6.0.4
    • >= 6.1.0, < 6.1.2
    • >= 6.2.0, < 6.2.3
    • >= 6.3.0, < 6.3.2

    Affected version of `qs` are vulnerable to Prototype Pollution because it is possible to bypass the protection. The `qs.parse` function fails to properly prevent an object's prototype to be altered when parsing arbitrary input. Input containing `[` or `]` may bypass the prototype pollution protection and alter the Object prototype. This allows attackers to override properties that will exist in all objects, which may lead to Denial of Service or Remote Code Execution in specific circumstances. ## Recommendation Upgrade to 6.0.4, 6.1.2, 6.2.3, 6.3.2 or later.

    CVE: CVE-2017-1000048

  • GHSA-crvj-3gj9-gm2pHigh
    High severity vulnerability that affects qs
    • < 1.0.0

    Withdrawn, accidental duplicate publish. The qs module before 1.0.0 in Node.js does not call the compact function for array data, which allows remote attackers to cause a denial of service (memory consumption) by using a large index value to create a sparse array.

  • GHSA-f9cm-p3w6-xvr3High
    Denial-of-Service Extended Event Loop Blocking in qs
    • < 1.0.0

    Versions prior to 1.0.0 of `qs` are affected by a denial of service vulnerability that results from excessive recursion in parsing a deeply nested JSON string. ## Recommendation Update to version 1.0.0 or later

    CVE: CVE-2014-10064

Showing 1-10 of 11 vulnerabilities