Home / ljharb / qs / CVE-2026-82417
CVE-2026-82417: is it exploited, and which versions of ljharb qs are affected and fixed?
CVE-2026-82417 is an uncaught exception (crash) vulnerability in ljharb qs. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 22:39 UTC). Affected: qs from 2.2.5 before 6.16.0 (GitHub advisory GHSA-4mjr-xmp4-gh2g). Fixed in 6.16.0 (GitHub advisory GHSA-4mjr-xmp4-gh2g). Severity: Medium (6.3, CVSS 3.1, from harborist).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 22:39 UTC, CVE record November 19, 2026, 07:06 UTC and NVD November 19, 2026, 07:08 UTC.
What is CVE-2026-82417?
qs.stringify throws TypeError on objects with a non-callable constructor.isBuffer property
### Summary `qs.stringify` throws a `TypeError` when it serializes an object whose own `constructor` property has a truthy, non-callable `isBuffer` member. `utils.isBuffer` duck-types buffers by calling `obj.constructor.isBuffer(obj)` after checking only that the property is truthy, so a value such as `{ constructor: { isBuffer: "x" } }` makes the call throw `TypeError: obj.constructor.isBuffer is not a function`. ### Details `lib/stringify.js:127` calls `utils.isBuffer` on every non-primitive value it serializes. `utils.isBuffer` (`lib/utils.js:332`) reads `obj.constructor.isBuffer` and invokes it without verifying that it is a function. `constructor` and `isBuffer` are ordinary property names, so any object carrying them as own properties reaches the unchecked call. Such an object can be built from untrusted input. `qs.parse("x[constructor][isBuffer]=y", { plainObjects: true })` or `{ allowPrototypes: true }` keeps the `constructor` key as an own property (the default parse options drop it), and `JSON.parse("{\"a\":{\"constructor\":{\"isBuffer\":\"x\"}}}")` produces the same shape with no qs option involved. Express 4 with its default `query parser` setting and body-parser with `extended: true` both call `qs.parse` with `allowPrototypes: true`, so on those stacks `req.query` and `req.body` can carry the shape directly. #### PoC ```js var qs = require("qs"); qs.stringify(qs.parse("x[constructor][isBuffer]=y", { plainObjects: true })); qs.stringify(JSON.parse("{\"a\":{\"constructor\":{\"isBuffer\":\"x\"}}}")); // TypeError: obj.constructor.isBuffer is not a function // at Object.isBuffer (lib/utils.js:332:78) // at stringify (lib/stringify.js:127:45) ``` #### Fix `lib/utils.js`, applied in e83d321 on `main` and released as v6.16.0: ```diff - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); + return !!(obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj)); ``` Real `Buffer`, `safer-buffer`, and browserify `buffer` polyfill instances serialize exactly as before; only the throw is removed. ### Affected versions `>=2.2.5 <6.16.0`, fixed in v6.16.0. The unguarded duck-type was introduced in 3768a75 and first shipped in v2.2.5 (September 2014). v2.2.4 and earlier used `Buffer.isBuffer` and are not affected. Every release from v2.2.5 through v6.15.3 contains the unguarded call. ### Impact An unauthenticated request can make any code path that re-serializes attacker-influenced data with `qs.stringify` (for example, rebuilding a query string from `req.query` for a redirect or an upstream request, or serializing a parsed JSON body) throw synchronously. In a typical Node.js HTTP framework the throw is caught by the framework error boundary and the affected request returns a 500; the process survives and other requests are unaffected. Where the call runs outside an error boundary, such as an `async` Express 4 handler (where the throw becomes an unhandled promise rejection) or a background job, the process exits, so the impact in that case depends on the application error handling rather than on qs.
From the CVE record by harborist, last updated August 31, 2026, 17:08 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| ljharb | qs | from 2.2.5 before 6.16.0 | 6.16.0 |
As the CVE record by harborist states it, last updated August 31, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | qs | >= 2.2.5, < 6.16.0 | 6.16.0 | GHSA-4mjr-xmp4-gh2g |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated September 2, 2026. Summary: qs: Denial of Service via Attacker Controlled isBuffer.
How severe is CVE-2026-82417?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 5.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | harborist |
| Medium 6.3 | CVSS 4.0 | 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 | harborist |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2026-82417 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: yes; technical impact: partial (CISA ADP, August 31, 2026)
- EPSS
- 0.40% probability of exploitation activity in the next 30 days, percentile 35.9 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
How do I fix it? (from the CVE record)
Upgrade to qs 6.16.0 or later.
Is there a workaround? (from the CVE record)
Pass a `filter` function to `qs.stringify` that drops values carrying an own `constructor` property; it runs before the `isBuffer` check. Alternatively, wrap `qs.stringify` calls on externally influenced objects in try/catch, and avoid `allowPrototypes: true` / `plainObjects: true` when parsed untrusted input is fed back into `qs.stringify`.
Where are the vendor advisories and references?
- https://github.com/ljharb/qs/security/advisories/GHSA-4mjr-xmp4-gh2g vendor-advisory
- https://github.com/ljharb/qs/commit/e83d321ffafb38cf210683ac31714fce6ce1c6c6 patch
Who found and reported it?
- waydeshi (finder)
- ljharb (remediation developer)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- August 28, 2026
- Published
- August 29, 2026, 23:51 UTC
- CVE record updated
- August 31, 2026, 17:08 UTC by harborist
- NVD
- Awaiting Analysis, last modified September 3, 2026, 18:00 UTC
- Last checked
- CVE list November 19, 2026, 07:06 UTC; NVD November 19, 2026, 07:08 UTC; KEV December 3, 2026, 22:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect qs?
- Oct 27, 2026CVE-2026-110910 ljharb qs: improper output encoding
- Oct 14, 2026CVE-2026-110816 ljharb qs: uncaught exception (crash)
- Aug 29, 2026CVE-2026-82562 ljharb qs: denial of service (resources allocated without limits)
- May 16, 2026CVE-2026-8723 ljharb qs: NULL pointer dereference (crash)
Questions about CVE-2026-82417
Is CVE-2026-82417 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 22:39 UTC. FIRST's EPSS gives it a 0.40% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of ljharb qs are affected by CVE-2026-82417?
qs from 2.2.5 before 6.16.0, per the GitHub advisory GHSA-4mjr-xmp4-gh2g. The tables above give every range the sources list.
Which version fixes CVE-2026-82417?
6.16.0, per the GitHub advisory GHSA-4mjr-xmp4-gh2g. Check the vendor's advisory before you rely on it.
How severe is CVE-2026-82417?
Medium (6.3, CVSS 3.1, from harborist). The severity table above shows each score with its source.
Where is the official record of CVE-2026-82417?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.