CVE-2026-82562: Qs Qs Array-limit Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-x5fp-wj9c-mxmx
CVSS 3.7
CWE-770
Published
Advisory Summary

CVE-2026-82562 is a MODERATE (CVSS 3.7) qs array-limit bypass vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Qs libraries in the npm ecosystem. The issue involves qs array-limit bypass via bracket-key comma parsing. Remediation is available by upgrading affected packages to version 6.16.0.

CVE-2026-82562 at a Glance

CVE Identifier CVE-2026-82562
GHSA Identifier GHSA-x5fp-wj9c-mxmx
Severity MODERATE
CVSS v3.1 Base Score 3.7
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Qs
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-82562

To remediate this vulnerability, upgrade all affected Qs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

qs fixed: 6.16.0
npm install qs@6.16.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls qs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-82562, inspect your project dependencies using npm:

npm ls qs

Analyze the terminal output to locate any version of Qs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.16.0), your application is affected.

Note: The npm ls qs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Qs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 arrays. ### PoC ```js const qs = require('qs') const options = { comma: true, arrayLimit: 3, throwOnLimitExceeded: true } const result = qs.parse('a[]=1,2,3,4', options) console.log(result.a[0].length) // 4; expected RangeError const big = qs.parse('a[]=' + '1,'.repeat(1000000) + '1', { comma: true, arrayLimit: 20 }) console.log(big.a[0].length) // 1000001 ``` On `v6.15.3`, the first input parses successfully and the second creates an array with 1,000,001 elements. The equivalent `a=1,2,3,4` input throws `RangeError` as expected. ### Impact An attacker who can supply a query string or form body can bypass configured array limits and force excessive memory allocation, causing denial of service. The limit must be applied after comma splitting and before the resulting array is wrapped.

CVE-2026-82562 Affected Qs Versions

1 component(s)
Fixed Versions:
6.16.0
Product / Package Ecosystem Affected Versions Fixed Version
qs
npm
≥ 6.14.2
< 6.16.0
6.16.0

References

Frequently Asked Questions

What is CVE-2026-82562?
CVE-2026-82562 is a security vulnerability in Qs involving qs array-limit bypass via bracket-key comma parsing under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Qs versions are affected?
Affected versions include releases prior to 6.16.0 across affected packages: qs.
What version fixes CVE-2026-82562?
Upgrading to 6.16.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is qs affected?
Yes, qs is affected in releases prior to 6.16.0. Upgrade your dependency to 6.16.0 or later.
What is the CVSS score of CVE-2026-82562?
CVE-2026-82562 has a CVSS v3.1 base score of 3.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-82562?
CVE-2026-82562 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check npm dependencies for CVE-2026-82562?
Run the dependency tree command: 'npm ls qs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x5fp-wj9c-mxmx",
  "modified" : "2026-09-02T14:46:57Z",
  "published" : "2026-09-02T14:46:57Z",
  "aliases" : [ "CVE-2026-82562" ],
  "summary" : "qs array-limit bypass via bracket-key comma parsing",
  "details" : "### Summary\n\n`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.\n\nAffected version tested:\n\n```text\nqs v6.15.3\ncommit 18d085e919dae70c8f1b200ab99323058edab2c2\n```\n\n### Details\n\n`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 arrays.\n\n### PoC\n\n```js\nconst qs = require('qs')\nconst options = { comma: true, arrayLimit: 3, throwOnLimitExceeded: true }\n\nconst result = qs.parse('a[]=1,2,3,4', options)\nconsole.log(result.a[0].length) // 4; expected RangeError\n\nconst big = qs.parse('a[]=' + '1,'.repeat(1000000) + '1', { comma: true, arrayLimit: 20 })\nconsole.log(big.a[0].length) // 1000001\n```\n\nOn `v6.15.3`, the first input parses successfully and the second creates an array with 1,000,001 elements. The equivalent `a=1,2,3,4` input throws `RangeError` as expected.\n\n### Impact\n\nAn attacker who can supply a query string or form body can bypass configured array limits and force excessive memory allocation, causing denial of service. The limit must be applied after comma splitting and before the resulting array is wrapped.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "qs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.14.2"
      }, {
        "fixed" : "6.16.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.15.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ljharb/qs/security/advisories/GHSA-w7fw-mjwx-w883"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ljharb/qs/security/advisories/GHSA-x5fp-wj9c-mxmx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-82562"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ljharb/qs/commit/8859c37470e11b42b547b275e4e9bd0bc8cc5464"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ljharb/qs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-02T14:46:57Z",
    "nvd_published_at" : "2026-08-30T01:20:32Z"
  }
}