> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# insecure-deserialization

> Request data is deserialized by a library that can rebuild and run functions from it.

## What it flags

Request data passed to a deserializer that rebuilds functions from its input: `unserialize` from `node-serialize`, `deserialize` from `serialize-to-js`, or `deepDeserialize` from `funcster`. A crafted payload runs code while it is parsed (CWE-502), for example node-serialize's `_$$ND_FUNC$$_` marker with a trailing `()`.

Parse the input as data with `JSON.parse` and validate it with a schema instead.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "insecure-deserialization": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.