The scanner sent {"__proto__": {...}} and got a 200. Did the prototype actually get polluted? Server-side prototype pollution as a DAST finding: own __proto__ keys and naive merges, why an echoed __proto__ proves nothing, gadgets and a second client, persistence until restart, constructor.prototype bypasses, and what deepmerge, --disable-proto, freezing and schemas actually stopped

DedSec Security Research ·

Here is a hypothetical. A dynamic scan of a Node.js API returns three results about prototype pollution.

The first is "Server-side prototype pollution", rated high, on POST /api/prefs. The scanner sent {"theme": "dark", "__proto__": {"pp1a2b3c": "cv9f8e7d"}} and the 200 response echoed the whole object back, __proto__ key and canary included. The second is a low, "Prototype pollution (blocked)", on POST /api/settings, an endpoint that takes dotted paths such as notifications.email. The scanner sent the path __proto__.pp1a2b3c and got a 400 saying "forbidden key", and the team reads that as a defence working. The third is not a finding. The scanner sent the same __proto__ body to POST /api/profile, got {"ok": true, "prefs": {"theme": "dark"}} with no trace of its payload, and recorded the endpoint as clean.

The high gets escalated, the low gets closed, and the clean result goes in the report. As elsewhere in this series, each call rests on the title and on what the first response looked like, not on what that response can prove. In our lab, built to reproduce this scenario, the echo on the first endpoint came from code that never touched Object.prototype. The "forbidden key" endpoint blocked __proto__ and let constructor.prototype through, which polluted the process every time. The clean-looking endpoint was the vulnerable one: its response was identical, field for field, to the response from a merge that is not vulnerable.

This post is for whoever is holding a prototype pollution finding against a Node.js service from a dynamic scan, or a clean result they are about to rely on. It covers:

It belongs to our series on confirming DAST findings. The series guide sets out the evidence classes the series uses, and lists this post as number 24. The closest neighbour is the NoSQL injection post, which is also about a JSON body that the server turns into something other than data. The insecure deserialization post covers the other way an object graph from a request becomes code.

How we tested. Everything ran on 18 November 2026 on a virtual machine with two vCPUs, Ubuntu 24.04.4 and kernel 6.8.0, using Node.js 22.22.2. The origin is a deliberately vulnerable application we wrote using only node:http, plus deepmerge 4.3.1 for one variant. It has a preferences endpoint that merges a JSON body into a per-user object, a settings endpoint that applies dotted-path writes, and four gadgets, described where they come up. Every response carries a per-process boot identifier and a serial number, a counter that increases on each response, so every observation can be attributed to one process and placed in order. A profile setting selects the merge or set-by-path implementation, and Node flags were applied per profile. Everything listened on 127.0.0.1 and ran as an unprivileged user.

The client was a Node harness on node:http, opening a new connection for every request. Each cell, one implementation against one payload shape, ran 20 trials, and every trial started a fresh server process, because pollution is process-global and one trial would otherwise contaminate the next. In each trial, a clean client (user "bob") made four requests, the probing client (user "alice") sent one payload, and bob repeated his four requests. There were 66 cells, 1,320 trials and 11,880 requests, plus a persistence run of 6,220 requests and a set of runtime micro-tests. One JSON line per request is archived with the lab.

This lab models our own toy code. It is not Express, body-parser, qs, lodash or any other library apart from deepmerge 4.3.1, and nothing here measures how those behave. Published research is described in our own words, not quoted. No number here measures any scanner, ours included.

How a JSON body reaches Object.prototype

In JavaScript, almost every object inherits from Object.prototype. Reading a property that an object does not have walks up that chain, so a property added to Object.prototype appears on every ordinary object in the process that does not define its own. That is prototype pollution, catalogued as CWE-1321. Olivier Arteau's 2018 NorthSec research on prototype pollution in Node.js applications is the usual starting point for the server-side form.

The route from a request to Object.prototype has three steps, and the first one surprises people.

JSON.parse creates an own property called __proto__. In an object literal in source code, {"__proto__": {...}} sets the new object's prototype. JSON.parse does not do that. It defines every key as an ordinary own data property, including one named __proto__. In our micro-tests on Node 22.22.2, JSON.parse('{"__proto__":{"x":1}}') produced an object whose own keys were ["__proto__"], whose prototype was still Object.prototype, and which left ({}).x undefined. The same text as an object literal produced an object with no own keys whose prototype had x. Parsing is harmless. The parsed object is carrying a key that means something special to the next piece of code that assigns through it.

A naive recursive merge reads target["__proto__"]. The usual shape walks the source's keys, and when the value is an object, it recurses into target[key], creating it if it is missing. On an ordinary target, target["__proto__"] is not missing. It is the inherited __proto__ accessor on Object.prototype, which returns Object.prototype itself. So the merge recurses into Object.prototype and copies the attacker's keys onto it. In our naive merge, {"__proto__": {...}} polluted the process in 20 of 20 trials, and so did the same object nested one level down, {"notifications": {"__proto__": {...}}}.

A set-by-path helper does the same thing one segment at a time. Helpers that turn a.b.c = value into nested writes walk each segment, creating objects as they go. A path of __proto__.isAdmin walks into Object.prototype at the first step. A path of constructor.prototype.isAdmin gets there without the word __proto__: an ordinary object's constructor is the Object function, and Object.prototype is that function's prototype property. In our naive set-by-path helper, both paths polluted the process in 20 of 20 trials.

constructor.prototype did not work against our naive merge, 0 of 20. That merge only recursed into values whose type was "object", and target.constructor is a function, so the merge replaced it with a new own property instead of walking into it. Whether a given merge is open to constructor.prototype depends on exactly that kind of detail, which is why the payload has to be tried rather than reasoned about.

Query strings can build the same objects. Bracket-syntax parsers turn a[b][c]=1 into nested objects, so __proto__[isAdmin]=true in a URL or a form body can produce the same shape as the JSON payload, if the parser allows that key. Whether it does depends on the parser and its options, and we did not test any. The NoSQL injection post measured how bracket syntax builds objects in one framework's parsers.

Client-side and server-side are different findings

Client-side prototype pollution happens in a browser. Usually a URL fragment or query is parsed by page script into an object, and a gadget in the page's own code turns a polluted property into script execution. Each exploitation affects the browser that loads the crafted URL, and testing it affects only the tester's browser.

Server-side pollution happens in the process that answers everybody. A polluted Object.prototype in a Node.js server is shared by every request that process handles, for every user, until the process exits. That changes three things for a DAST finding. The tester usually cannot see the polluted object, because it never appears in a response. The effect may only be visible on other endpoints, or to other users. And the probe itself is a change to shared state, which is the test-safety issue covered below.

Why the scanner's first response cannot settle it

Here is what the probing client got back from our toy, against several implementations, for the same {"theme": "dark", "__proto__": {...}} payload. "Polluted" means the clean client's later requests changed, as described in the next section.

ImplementationFirst response to the proberResponse contained the text __proto__Polluted the process
Naive recursive merge200, {"ok":true,"prefs":{"theme":"dark"}}0 of 2020 of 20
deepmerge 4.3.1200, {"ok":true,"prefs":{"theme":"dark"}}0 of 200 of 20
Naive merge with Object.prototype frozen200, {"ok":true,"prefs":{"theme":"dark"}}0 of 200 of 20
Shallow spread, {...prefs, ...body}200, body includes "__proto__":{...} with the canary20 of 200 of 20
Naive merge into an Object.create(null) target200, body includes "__proto__":{...} with the canary20 of 200 of 20
Naive merge under --disable-proto=delete200, body includes "__proto__":{...} with the canary20 of 200 of 20
Naive merge under --disable-proto=throw500, an error message naming __proto__20 of 200 of 20
Schema check rejecting unknown keys400, unknown key "__proto__"20 of 200 of 20

Two results in that table decide how to read a scanner's first response.

An echoed __proto__ was a sign the prototype was not touched. When a merge or copy assigns through the __proto__ accessor, the attacker's keys go onto the prototype and the target gets nothing, so JSON.stringify of the target, which only serialises own properties, shows nothing. When the key is copied as an own data property, as spread does, as a null-prototype target does because it has no accessor to assign through, and as --disable-proto=delete does because it removes the accessor, JSON.stringify faithfully writes "__proto__" back out. In our lab, every echo came from an implementation that did not pollute, and no implementation that polluted echoed. That is a property of our toy's serialisation, not a law. A server could echo the request body verbatim and be vulnerable too. But it means an echo is not evidence of pollution in either direction.

The vulnerable response and the safe response were the same JSON. Parsed, the naive merge's response and deepmerge's response were identical in all 20 trials each: {"ok":true,"prefs":{"theme":"dark"}}. The set-by-path cells did the same, {"ok":true,"prefs":{}} from the polluting helper and from the safe one. The only byte-level difference in our runs was whitespace, and that came from one of our gadgets, not from the merge. A scanner comparing the first response with a baseline would see the same thing in both cases.

The 500 and the 400 are worth reading as well. Under --disable-proto=throw, any code that touches the __proto__ accessor throws. Our handler turned that into a 500 whose message, Accessing Object.prototype.__proto__ has been disallowed with --disable-proto=throw, says exactly which defence fired. A 500 in response to a __proto__ payload is easy to read as "the payload broke something, so it reached something". Here it was the defence. And a 400 that names the key tells you the key was rejected. It does not tell you whether constructor.prototype would be.

The evidence classes that can confirm it

Since the polluted object never comes back, confirmation means looking for its effects somewhere else. Our toy has four places where an inherited property changes behaviour, and the clean client checked all four before and after each probe.

Gadget in the toyWhat reads the propertyWhat the clean client sees when polluted
Reflection/api/config copies a defaults object with for...in, which includes inherited enumerable propertiesThe probe's random property name and canary value in an unrelated response
JSON spacesEvery response is serialised with JSON.stringify(obj, null, settings.jsonSpaces) and settings is {}Every response comes back indented
Status codeA malformed-JSON error takes its status from the error object's statusCode, then status, then defaults to 400A deliberately malformed request gets 510 instead of 400
Authorisation default/api/admin allows a user if user.isAdmin is truthy, and no user object sets itA non-admin user gets 200 instead of 403

Before every probe, the clean client saw 403, 400, no canary and no indentation in all 1,320 trials. In every one of the 66 cells, the four gadgets agreed with each other: either all four changed for the clean client in all 20 trials, or none did in any. Every trial's serials ran in order inside one boot identifier: bob's four requests, alice's probe, then bob's four again. So each clean-client observation came from the same process, after the probe.

Three things about these evidence classes are worth carrying to a real application.

Reflection depends on how the code enumerates. /api/config reflected the canary whenever the process was polluted. /api/me, which serialised a plain object with JSON.stringify, did not reflect it once, in any of the 1,320 trials, because JSON.stringify, Object.keys and spread only see own properties. An endpoint that does not reflect the canary has not shown that the process is clean. It may simply not enumerate inherited properties.

Behaviour-change gadgets are what make black-box detection possible. Gareth Heyes's PortSwigger Research article "Server-side prototype pollution: Black-box detection without the DoS" set out this approach, which we paraphrase here. Instead of polluting something that crashes the server, you pollute a property that a common framework or library reads, where the only effect is a visible but harmless change. His examples included an Express setting that controls JSON response indentation, a status-code property that an error-handling path reads when it rejects a malformed body, and a charset override that changes how later request bodies are decoded. Our JSON-spaces and status-code gadgets are toy versions written into our own code. We did not test Express, and our results say nothing about which properties any real framework reads. With our toy's JSON-spaces gadget, the probing client's own response came back indented in every cell that polluted. That is the one case where the first response does carry the signal, and it only exists because something in the application reads the polluted property while building that response.

A second client on a new connection is what makes it a finding. "The probe changed a later response" can have boring explanations: per-session state, per-connection caching, or the prober's own preferences being reflected back. A client with a different identity, on a new connection, sending only requests that would have been harmless before, rules those out. In our lab, that client was bob, and he never sent anything containing __proto__ or constructor.

Persistence, and why the probe is the incident

We ran 20 more trials against the naive merge, in parallel, each on its own server process. Alice polluted Object.prototype once with a random canary and isAdmin. Then:

AfterBob saw the canary and got 200 on /api/admin
Immediately20 of 20
300 unrelated requests from a third user20 of 20
A further 30 seconds idle (at least 57 seconds after the probe in every trial)20 of 20
A process restart0 of 20

The boot identifier stayed the same until the restart and changed after it in all 20 trials. In this toy, nothing undoes pollution except a new process. By mechanism, that holds in any Node.js process: there is no request boundary around Object.prototype. Two practical consequences follow.

Intermittent results may be a process count, not flakiness. A service running several worker processes, under a cluster module, a process manager or several containers behind a load balancer, has one Object.prototype per process. A probe pollutes the process that handled it. A clean client's later requests land on whichever process the balancer chooses, so the effect can appear on some requests and not others. We ran one process per trial and did not measure this. It is a consequence of the mechanism, and a reason to confirm with repeated requests rather than one.

The test changes production for everyone. A probe that pollutes isAdmin, statusCode or anything an authorisation check, error handler or serialiser reads changes that behaviour for every user of that process until it restarts. Our isAdmin gadget is the extreme case: one request from one user made every user of the process an administrator (we measured it for the second lab user). General practice for testing this class:

A scanner that sends prototype pollution payloads is making the same change, and needs the same scoping as a person doing it.

From pollution to impact needs a gadget

Pollution on its own changes defaults. Impact depends on what in the process reads a property it never set. These are general gadget classes, described from public research and our toy, not measured against any framework.

We tested that last class on Node 22.22.2, in isolated child processes, with Object.prototype.shell = true and with Object.prototype.env set to an environment containing NODE_OPTIONS=--require <a marker script>:

CallInherited shell usedInherited env / NODE_OPTIONS used
spawnSync(cmd, args), options omittedNo: $((6*7)) printed literallyNo: marker not written
spawnSync(cmd, args, {cwd: "/tmp"})NoNo
Positive control: {shell: true} passed explicitlyYes: printed 42n/a
Positive control: env with NODE_OPTIONS passed explicitlyn/aYes: marker written
Application wrapper that copies options with for...in before calling spawnSyncYes: printed 42not tested

In our measurements, Node 22.22.2's spawnSync did not act on an inherited shell or env, while the positive controls showed the test could detect both. We did not trace which release changed this, and we did not test exec, execFile, fork or the asynchronous spawn. The last row is the one to remember. The caller's options object did inherit shell: true. Node did not read it, but an application helper that "merges defaults" with for...in turned the inherited property into an own one, and the shell ran. The gadget moved out of the runtime and into application code. So "our Node version is patched" does not close a child-process gadget. The question is what the application does with option objects before they reach Node. The OS command injection post covers how to confirm command execution once you suspect it.

Confirming server-side prototype pollution

  1. Find the sink. Look for endpoints that take nested JSON and apply it to existing state: preferences, settings, profile updates, "patch" endpoints, and anything that takes dotted or bracketed paths.
  2. Establish a clean baseline from a second identity. Before any probe, record what a different user, on a new connection, gets from a handful of unrelated endpoints, including at least one that is likely to enumerate an object and one deliberately malformed request.
  3. Probe with a property nothing reads. A random name and value, sent as {"__proto__": {...}}, as the same object nested one level down, and as {"constructor": {"prototype": {...}}}. For path-based endpoints, send __proto__.name and constructor.prototype.name.
  4. Ignore the first response for the verdict. Record it, but remember that in our lab a 200, an echo, a 400 and a 500 all came from implementations that did not pollute, and a plain 200 with no echo came from both polluting and non-polluting ones.
  5. Re-run the clean identity's baseline. Look for the canary in any response, then for any behaviour change. If nothing reflects, a gentle behaviour gadget may be needed, with the consent and restart plan above.
  6. Repeat across requests. If the service runs several processes, expect partial results and check enough requests to tell "some processes" from "none".
  7. Escalate to impact only on a test instance. Finding a gadget that reaches authorisation or a child process is where severity comes from, and it is also where the test stops being harmless.
  8. Ask for a restart, and verify that it cleared the effect. In our lab it did, 20 of 20.

What to record: the sink and the payload shape that worked, the clean identity's before and after responses with timestamps, which gadget changed, whether more than one process was involved, and when the process was restarted.

Fixes, and what they cost

Each row is one implementation in our toy, with 20 trials per payload shape. "Echoed" means the first response contained the payload's __proto__ key. A status code means every trial got that status and nothing was polluted.

Implementation__proto__Nested __proto__constructor.prototypeUnicode-escaped __proto__
Naive merge, no fix (for reference)polluted, 20 of 20polluted, 20 of 20not polluted (see note)polluted, 20 of 20
Merge skips __proto__not pollutednot pollutednot polluted (see note)not polluted
Merge skips __proto__, constructor, prototypenot pollutednot pollutednot pollutednot polluted
Regex on the raw request body rejecting any of the three words400400400polluted, 20 of 20
deepmerge 4.3.1not pollutednot pollutednot pollutednot polluted
Object.create(null) target, nested objects created as {}not polluted, echoedpolluted, 20 of 20not pollutednot polluted, echoed
structuredClone of the body, then the naive mergepolluted, 20 of 20polluted, 20 of 20not polluted (see note)polluted, 20 of 20
JSON.parse(JSON.stringify(body)), then the naive mergepolluted, 20 of 20polluted, 20 of 20not polluted (see note)polluted, 20 of 20
--disable-proto=deletenot polluted, echoednot polluted, echoednot polluted (see note)not polluted, echoed
--disable-proto=throw500500not polluted (see note)500
Object.freeze(Object.prototype)not pollutednot pollutednot pollutednot polluted
Schema validation rejecting unknown keys400400400400

Note on the rows marked "see note": this is not because of the fix. Our merge never walks into a function, so constructor was replaced rather than followed, as described earlier. A merge that does walk into functions would need the fix to hold here as well.

And for the set-by-path helper:

Implementation__proto__.xconstructor.prototype.x
Nonepolluted, 20 of 20polluted, 20 of 20
Reject any segment equal to __proto__400polluted, 20 of 20
Reject __proto__, constructor and prototype400400
Only walk into own properties (Object.hasOwn), create otherwisenot pollutednot polluted
--disable-proto=deletenot pollutedpolluted, 20 of 20
--disable-proto=throw500polluted, 20 of 20
Object.freeze(Object.prototype)not pollutednot polluted

What each fix does, and what it costs:

Key denylists work only if they are complete and applied after parsing. Blocking __proto__ alone left the constructor.prototype path open on the set-by-path helper, which is the hypothetical's "blocked" low. Blocking all three keys held everywhere we tried it. A regex over the raw request text is a different thing. JSON allows any character to be written as a \u escape, so "\u005f\u005fproto\u005f\u005f" contains none of the blocked words until JSON.parse decodes it to __proto__. That payload went straight past the regex and polluted the process in 20 of 20 trials. The same applies to a WAF rule matching body text. Check keys on the parsed object, at every level.

deepmerge 4.3.1 held against every shape we sent. Its source skips a key when the key exists on the target but is not the target's own enumerable property, which is exactly the inherited __proto__ and constructor case. That result is for this version, and it does not cover other merge libraries, which we did not test.

Object.create(null) protects only the objects that are created that way. A null-prototype target has no __proto__ accessor, so the top-level payload became an ordinary own key and was echoed back. But the merge created nested objects as {}, which have the normal prototype, and the nested payload polluted the process in 20 of 20 trials. A Map gives the same protection more reliably for dictionary-shaped data, since its entries are not properties at all, but it changes every read and write site and does not serialise with JSON.stringify without conversion.

Cloning is not sanitising. structuredClone and a JSON round trip both preserved the own __proto__ key. Our micro-test showed structuredClone keeping it, and both variants polluted exactly as the naive merge did. A copy of a dangerous object is a dangerous object.

--disable-proto removes one route. With delete, the accessor is gone, so __proto__ became an ordinary key everywhere, and ({}).__proto__ returned undefined. Object.getPrototypeOf still worked, and so did the __proto__ key in object-literal syntax, which is syntax and not the accessor. With throw, any code that touched the accessor got an exception, including legitimate code, which surfaced as a 500. Neither flag did anything about constructor.prototype, which polluted the set-by-path helper in 20 of 20 trials under both. The flag also applies to every dependency in the process, so any library that reads or writes obj.__proto__ breaks with it. Run your test suite under it before shipping it.

Object.freeze(Object.prototype) held against everything, and breaks a common pattern. Once Object.prototype is frozen, its properties are non-writable, and JavaScript then refuses to create an own property of the same name on an ordinary object by assignment. This is the so-called override mistake. In our micro-tests, o.toString = ... on a plain object was silently ignored in sloppy mode and threw a TypeError in strict mode, and in strict mode, assigning hasOwnProperty on a constructor's prototype threw too. Object.defineProperty still worked. Freezing has to happen before the process handles any untrusted input. Doing it before dependencies load also exposes any dependency that assigns over a built-in method name, and those need testing. Our toy server ran in sloppy mode, so pollution attempts against the frozen prototype failed silently with a 200. In strict mode, the same writes threw.

Walking only own properties held, and reshaped the user's own object. The Object.hasOwn variant treated __proto__ as missing, so it assigned a new {} to it. That assignment went through the accessor and replaced the target object's own prototype, so the write landed on a fresh object instead of Object.prototype. The process was not polluted. In our micro-test, the user's object then inherited the attacker's property, while JSON.stringify of it still showed {}. Pair this check with a key denylist, or create properties with Object.defineProperty.

Schema validation with unknown keys rejected is the narrowest fix. It answered 400 to every shape we sent, because none of them was in the allowed shape. It costs a schema for every endpoint that accepts nested input, which is also what stops mass assignment. It is the only fix in our tables that rejects the input before any merge code runs.

Code that reads options should not trust inheritance. Independent of the merge, read configuration with Object.hasOwn(options, "x") or from a null-prototype object, and give every flag an own value when the object is created (const settings = { jsonSpaces: 0 }, isAdmin: false on every user record). A fallback such as settings.jsonSpaces ?? 0 or a check such as user.isAdmin === true does not help, because an inherited value is neither nullish nor of the wrong type. Reading only own properties removes the gadget even if pollution happens somewhere else.

The static side

Code review can find both halves. On the sink side, look for recursive merge, extend, clone-into and defaults helpers, especially home-grown ones; set-by-path and "patch" helpers; any target[key] = ... or target[key][subkey] where key comes from a request; and query or form parsers configured to build nested objects. On the gadget side, look for for...in copies of option objects, authorisation checks that read a flag that is not always set, and option bags passed to template engines and child_process. A finding is the pair: a sink that reaches Object.prototype, and a gadget that reads what it wrote. Static analysis for this class is a taint question, with a request body as source and a computed-key assignment as sink. Whether a given tool models it is something to check, and the SAST false-positives post covers how taint results go wrong.

A triage checklist for a prototype pollution finding

QuestionIf the answer is no or unknown
Is the finding based on an echo of __proto__ in the first response?That echo came only from implementations that did not pollute in our lab
Is the finding based on a 200, 400 or 500 alone?Status codes from the probe do not show what happened to the prototype
Did a second identity, on a new connection, see a change it did not cause?Pollution is not confirmed
Was the change a reflected canary or a gadget, and from which endpoint?Severity and mechanism are not established
Were constructor.prototype, nested and unicode-escaped payloads tried?A blocked __proto__ says nothing about the other routes
Does the service run more than one process?Expect partial results, and do not read them as noise
Was the probe property one that nothing reads, and was a restart planned?The test itself may have changed production behaviour
Is there a gadget that reaches authorisation, templates or child processes?Impact is not established
Does the fix check keys after parsing, at every level, including constructor and prototype?Raw-text filters and __proto__-only lists were bypassed in our lab
Was the fix retested with all payload shapes and a second identity, after a restart?A retest that resends one payload can pass a partial fix, as the scan-passed post describes

FAQ

Does an echoed __proto__ key in the response mean the server is vulnerable to prototype pollution? No. In our lab, the __proto__ key came back only from implementations that stored it as an ordinary own property: shallow spread, a null-prototype target, and a process run with --disable-proto=delete. None of them polluted the prototype. The vulnerable merge returned no trace of the payload.

Is a 200 response to a __proto__ payload evidence of prototype pollution? No. The vulnerable and safe merges returned the same status and the same JSON. Confirmation needs a different client, on a new connection, to see a change: a reflected property, or a gadget behaving differently.

How long does server-side prototype pollution last? Until the process exits. In our lab it survived 300 unrelated requests and at least 57 seconds in 20 of 20 trials, and a restart cleared it in 20 of 20.

Does blocking __proto__ fix prototype pollution? Not on its own. constructor.prototype reached Object.prototype through a set-by-path helper that blocked __proto__, in 20 of 20 trials. A raw-text filter was bypassed by a unicode-escaped key.

Does node --disable-proto fix prototype pollution? It removes the __proto__ accessor route only. constructor.prototype still polluted the process under both delete and throw in our lab.

Does Object.freeze(Object.prototype) break anything? Yes. Assigning a property such as toString on an ordinary object is silently ignored in sloppy mode and throws in strict mode, so code and dependencies that do this need changing or testing.

How do I test for server-side prototype pollution without breaking production? Use a random property name that nothing reads, check for it from a second identity, use only harmless behaviour gadgets, and plan a process restart before you start. Prefer a test instance.

What this post did not measure

We measured our own toy server on Node.js 22.22.2, with one process per trial. We did not test Express, body-parser, qs or any query-string parser, lodash or any merge library except deepmerge 4.3.1, any template engine, Bun or Deno, browsers or client-side pollution, clustered or multi-process deployments, asynchronous spawn, exec, execFile or fork, or any scanner's prototype pollution check. The gadgets are code we wrote to have those behaviours. They model patterns that real frameworks and libraries have been reported to have, and they are not a measurement of any of them. None of the numbers measures AppSecD or any other product.

The hypothetical findings, resolved

Where AppSecD fits

AppSecD's dynamic and API testing runs Nuclei, Dalfox, SQLMap, Commix, Katana, Arjun, FFuf and Interactsh for out-of-band detection, plus 150+ native checks and API discovery across 50+ web frameworks. Its policy-driven gating blocks a pull request or commit when it introduces a violation. Findings are deduplicated across scans, move through new, reopened and fixed states, and can require maker-checker approval before they are closed.

That is the whole claim. data/products.ts is the single source of truth for what these products do, and it does not mention prototype pollution, JavaScript object prototypes or Node.js-specific dynamic checks. So this post makes no claim that AppSecD detects server-side prototype pollution. Nor does it claim anything about:

The mechanisms, measurements, confirmation procedure, fixes and checklist above are general practice that applies to any scanner's output, ours included. The scenario in this post is hypothetical and does not describe any deployment, user or finding.

More about AppSecD · All posts