CVEfocus › CVE database › CVE-2026-82417

CVE-2026-82417qs.stringify throws TypeError on objects with a non-callable constructor.isBuffer property

CVSS 5.3 MediumEPSS 0.4% (higher than 28% of CVEs)Published 2026-08-29Updated 2026-08-31Assigner: harborist

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

CWE-248CWE-703

What to do

Fixed builds are available from Debian, npm: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
12Fix pending
3Under investigation
19Will not fix
84Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10node-qsFix pendingUBUNTU-CVE-2026-82417
Ubuntu 26.04node-qsUnder investigationUBUNTU-CVE-2026-82417
Ubuntu 24.04node-qsUnder investigationUBUNTU-CVE-2026-82417
Ubuntu 22.04node-qsUnder investigationUBUNTU-CVE-2026-82417
Ubuntu 20.04node-qsFix pendingUBUNTU-CVE-2026-82417
Ubuntu 18.04node-qsFix pendingUBUNTU-CVE-2026-82417
Ubuntu 16.04node-qsFix pendingUBUNTU-CVE-2026-82417
Ubuntu 14.04node-qsFix pendingUBUNTU-CVE-2026-82417
Debian 14node-qsFixed6.16.0+ds+~6.15.1-1DEBIAN-CVE-2026-82417
Debian 13node-qsFix pendingDEBIAN-CVE-2026-82417
Debian 12node-qsFix pendingDEBIAN-CVE-2026-82417
Red Hat Enterprise Linux 10cockpit-ha-clusterNot affected
Red Hat Enterprise Linux 10grafanaNot affected
Red Hat Enterprise Linux 10grafana-pcpNot affected
Red Hat Enterprise Linux 10grafana-selinuxNot affected
Red Hat Enterprise Linux 10librados-develFix pending
Affected
Red Hat Enterprise Linux 10librados2Fix pending
Affected
Red Hat Enterprise Linux 10libradospp-develFix pending
Affected
Red Hat Enterprise Linux 10librbd-develFix pending
Affected
Red Hat Enterprise Linux 10librbd1Fix pending
Affected
Red Hat Enterprise Linux 10linux-sgxNot affected
Red Hat Enterprise Linux 10nodejsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs-develWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs-docsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs-full-i18nWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs-libsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs-npmWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs22Will not fix
Will not fix
Red Hat Enterprise Linux 10nodejs24Will not fix
Will not fix
Red Hat Enterprise Linux 10nodejs24-develWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs24-docsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs24-full-i18nWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs24-libsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs24-npmWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs26Will not fix
Will not fix
Red Hat Enterprise Linux 10nodejs26-develWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs26-docsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs26-full-i18nWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs26-libsWill not fix
Will not fix
Red Hat Enterprise Linux 10nodejs26-npmWill not fix
Will not fix
Red Hat Enterprise Linux 10pcsNot affected
Red Hat Enterprise Linux 10pcs-snmpNot affected
Red Hat Enterprise Linux 10sgx-commonNot affected
Red Hat Enterprise Linux 10sgx-libsNot affected
Red Hat Enterprise Linux 10sgx-mpaNot affected
Red Hat Enterprise Linux 10sgx-pccsNot affected
Red Hat Enterprise Linux 10sgx-pccs-adminNot affected
Red Hat Enterprise Linux 10sgx-pckid-toolNot affected
Red Hat Enterprise Linux 10tdx-qgsNot affected
Red Hat Enterprise Linux 9aspnetcore-runtime-6.0Not affected
Red Hat Enterprise Linux 9aspnetcore-runtime-7.0Not affected
Red Hat Enterprise Linux 9aspnetcore-targeting-pack-6.0Not affected
Red Hat Enterprise Linux 9aspnetcore-targeting-pack-7.0Not affected
Red Hat Enterprise Linux 9dotnet-apphost-pack-6.0Not affected
Red Hat Enterprise Linux 9dotnet-apphost-pack-7.0Not affected
Red Hat Enterprise Linux 9dotnet-hostNot affected
Red Hat Enterprise Linux 9dotnet-hostfxr-6.0Not affected
Red Hat Enterprise Linux 9dotnet-hostfxr-7.0Not affected
Red Hat Enterprise Linux 9dotnet-runtime-6.0Not affected
Red Hat Enterprise Linux 9dotnet-runtime-7.0Not affected
Red Hat Enterprise Linux 9dotnet-sdk-6.0Not affected
Red Hat Enterprise Linux 9dotnet-sdk-6.0-source-built-artifactsNot affected
Red Hat Enterprise Linux 9dotnet-sdk-7.0Not affected
Red Hat Enterprise Linux 9dotnet-sdk-7.0-source-built-artifactsNot affected
Red Hat Enterprise Linux 9dotnet-targeting-pack-6.0Not affected
Red Hat Enterprise Linux 9dotnet-targeting-pack-7.0Not affected
Red Hat Enterprise Linux 9dotnet-templates-6.0Not affected
Red Hat Enterprise Linux 9dotnet-templates-7.0Not affected
Red Hat Enterprise Linux 9dotnet6.0Not affected
Red Hat Enterprise Linux 9dotnet7.0Not affected
Red Hat Enterprise Linux 9grafanaNot affected
Red Hat Enterprise Linux 9grafana-pcpNot affected
Red Hat Enterprise Linux 9grafana-selinuxNot affected
Red Hat Enterprise Linux 9linux-sgxNot affected
Red Hat Enterprise Linux 9netstandard-targeting-pack-2.1Not affected
Red Hat Enterprise Linux 9nodejsNot affected
Red Hat Enterprise Linux 9nodejs-docsNot affected
Red Hat Enterprise Linux 9nodejs-full-i18nNot affected
Red Hat Enterprise Linux 9nodejs-libsNot affected
Red Hat Enterprise Linux 9npmNot affected
Red Hat Enterprise Linux 9pcsNot affected
Red Hat Enterprise Linux 9pcs-snmpNot affected
Red Hat Enterprise Linux 9sgx-commonNot affected
Red Hat Enterprise Linux 9sgx-libsNot affected
Red Hat Enterprise Linux 9sgx-mpaNot affected
Red Hat Enterprise Linux 9sgx-pccsNot affected
Red Hat Enterprise Linux 9sgx-pccs-adminNot affected
Red Hat Enterprise Linux 9sgx-pckid-toolNot affected
Red Hat Enterprise Linux 9tdx-qgsNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8grafana-azure-monitorNot affected
Red Hat Enterprise Linux 8grafana-cloudwatchNot affected
Red Hat Enterprise Linux 8grafana-elasticsearchNot affected
Red Hat Enterprise Linux 8grafana-graphiteNot affected
Red Hat Enterprise Linux 8grafana-influxdbNot affected
Red Hat Enterprise Linux 8grafana-lokiNot affected
Red Hat Enterprise Linux 8grafana-mssqlNot affected
Red Hat Enterprise Linux 8grafana-mysqlNot affected
Red Hat Enterprise Linux 8grafana-opentsdbNot affected
Red Hat Enterprise Linux 8grafana-pcpNot affected
Red Hat Enterprise Linux 8grafana-postgresNot affected
Red Hat Enterprise Linux 8grafana-prometheusNot affected
Red Hat Enterprise Linux 8grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafana-stackdriverNot affected
Red Hat Enterprise Linux 8mozjs60Not affected
Red Hat Enterprise Linux 8mozjs60-develNot affected
Red Hat Enterprise Linux 8pcsNot affected
Red Hat Enterprise Linux 8pcs-snmpNot affected
Red Hat Enterprise Linux 7python-syspurposeNot affected
Red Hat Enterprise Linux 7rhsm-gtkNot affected
Red Hat Enterprise Linux 7subscription-managerNot affected
Red Hat Enterprise Linux 7subscription-manager-cockpitNot affected
Red Hat Enterprise Linux 7subscription-manager-guiNot affected
Red Hat Enterprise Linux 7subscription-manager-initial-setup-addonNot affected
Red Hat Enterprise Linux 7subscription-manager-migrationNot affected
Red Hat Enterprise Linux 7subscription-manager-plugin-containerNot affected
Red Hat Enterprise Linux 7subscription-manager-plugin-ostreeNot affected
Red Hat Enterprise Linux 7subscription-manager-rhsmNot affected
Red Hat Enterprise Linux 7subscription-manager-rhsm-certificatesNot affected
npm libraryqsFixed6.16.0GHSA-4mjr-xmp4-gh2g

What the vendor says

As published in the CVE record by harborist, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Upgrade to qs 6.16.0 or later.

Workaround: 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`.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.