npm audit reports CVE-2026-82417 against qs on every Express app, because Express pulls the package in twice. Whether one request can actually hurt you depends on a question no severity score can answer: does your own code turn request data back into a query string?
![npm audit flags qs on every Express app. The crash needs your own code to turn request data back into a query string. A flowchart of when the qs CVE-2026-82417 bug is reachable in an Express app. A red box, one form POST carrying x[constructor][isBuffer]=y with no login needed, feeds an amber express.urlencoded() box that parses with allowPrototypes: true and keeps the poisoned key. A grey question box asks whether your code calls qs.stringify on request data. The no branch, most apps, ends in a green box: the object is never serialized and the advisory is present but not reachable. The yes branch, drawn thick and red for redirects, upstream calls and signing, leads to a red TypeError box and then a red outcome box: HTTP 500 with the app still running on Express 5, or the process exiting in an Express 4 async handler.](/diagrams/qs-stringify-reachability.png)
Reading the diagram
Top, red: the request. One unauthenticated form POST with a 26-character body, x[constructor][isBuffer]=y. Red marks what an attacker controls, and here that's the whole input.
Amber: express.urlencoded(). This is the precondition, and you didn't set it. With default options qs.parse strips the constructor key, but body-parser passes allowPrototypes: true, so the poisoned key survives into req.body. Amber because nothing breaks here. It only lets the payload through.
Grey: the question that decides it. Parsing never throws. The bug lives in qs.stringify, which calls obj.constructor.isBuffer(obj) without checking that it's a function. So the path only continues if your code serializes request data again.
Green: most apps stop here. If nothing calls qs.stringify on what came in, the object sits in memory and nothing happens. The advisory is real and present in your lockfile, and it can't be reached.
Red, thick: the apps that do. Redirect builders, upstream API calls that forward user parameters, and request signing all rebuild query strings. That's where the TypeError fires, and the last box is where your Express version decides the cost: a 500 on Express 5, a dead process on Express 4 with an async handler.
What to do with it
Upgrade first, since it's one command: npm update qs, then npm ls qs should show 6.16.0 or later. Then run the grep from the full write-up to find out whether you were ever on the red path. If you're on Express 4 with async handlers, that's worth fixing on its own, because any throw in one of them takes the process down the same way.
The Mermaid source
Copy this and relabel the boxes for another advisory with the same shape.
---
title: "Parsing it is harmless. Stringifying it throws."
---
flowchart TB
REQ["One form POST<br/>x[constructor][isBuffer]=y"]
PARSE["express.urlencoded()<br/>parses with allowPrototypes: true"]
ASK["Does your code call<br/><b>qs.stringify on request data?</b>"]
IDLE["Object is never serialized<br/>advisory present, not reachable"]
THROW["TypeError<br/>obj.constructor.isBuffer is not a function"]
OUT["Express 5: HTTP 500, app keeps running<br/>Express 4 async handler: process exits"]
REQ -->|"no login needed"| PARSE
PARSE -->|"poisoned key kept"| ASK
ASK -->|"no: most apps"| IDLE
ASK -->|"yes: redirects,<br/>upstream calls, signing"| THROW
THROW --> OUT
classDef public fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1c1917
classDef gate fill:#fffbeb,stroke:#f59e0b,stroke-width:2px,color:#1c1917
classDef private fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#1c1917
classDef store fill:#f5f5f4,stroke:#57534e,stroke-width:2px,color:#1c1917
class REQ,THROW,OUT public
class PARSE gate
class IDLE private
class ASK store
linkStyle 3 stroke:#ef4444,stroke-width:3px
linkStyle 4 stroke:#ef4444,stroke-width:3px
Does every Express app have the qs vulnerability?
Every Express app carries the package, because Express and body-parser both depend on qs, so npm audit reports it everywhere until qs 6.16.0 or later is installed. Carrying it is not the same as being reachable: the TypeError only fires when your code passes request data to qs.stringify.
Why does express.urlencoded matter here?
With default options, qs.parse strips the constructor key and returns an empty object. body-parser, which express.urlencoded uses, passes allowPrototypes: true, so the poisoned key survives into req.body. That is the amber box: it doesn't throw, it just lets the payload through.
What kind of code calls qs.stringify on request data?
Code that rebuilds a query string from what the user sent: building a redirect URL, forwarding parameters to an upstream API, or canonicalising parameters before signing them. Grep your routes for qs.stringify to find out.
Why does Express 4 crash when Express 5 doesn't?
Express 5's router catches rejected promises from async handlers and turns them into a 500. Express 4 doesn't, so a throw inside an async handler becomes an unhandled rejection and Node exits the process.
Find the reachable ones
Scan your deployed app for the issues a stranger can actually reach, not just the ones in your lockfile.