---
title: "GHSA-5888-ffcr-r425: Prototype Pollution leading to Remote Code Execution in superjson"
description: "Critical severity. Prototype Pollution leading to Remote Code Execution in superjson. Affects superjson; fixed in 1.8.1."
url: https://inlinr.com/advisories/GHSA-5888-ffcr-r425
lang: en
---

[Packages](https://inlinr.com/packages) / [superjson](https://inlinr.com/packages/superjson) / [Security](https://inlinr.com/packages/superjson/security)

Critical Vulnerability GHSA-5888-ffcr-r425 CVE-2022-23631 Published 9 Feb 2022

# Prototype Pollution leading to Remote Code Execution in superjson

Your version 

Affected releases · [superjson](https://inlinr.com/packages/superjson)

- 1.x 1.0.0 – 1.8.0 Fixed in 1.8.1
- 0.0.x 0.0.1 – 0.0.6 No fix on this line yet

On 1.x, the newest line:

```
npm install superjson@1.8.1
```

Every release on a timeline

2.x 

1. Not affected

2.0.0 – 2.2.7  
9 releases, latest

1.x 

1. Affected

1.0.0 – 1.8.0  
22 releases
2. Fixed

1.8.1 – 1.13.3  
16 releases

0.x 

1. Affected

0.0.1 – 0.0.6  
6 releases

53 stable releases of superjson, oldest to newest, one row per major.

## What happens

Impact

This is critical vulnerability, as it allows to run arbitrary code on any server using superjson input, including a Blitz.js server, without prior authentication or knowledge. Attackers gain full control over the server so they could steal and manipulate data or attack further systems. The only requirement is that the server implements at least one endpoint which uses superjson during request processing. In the case of Blitz.js, it would be at least one RPC call. 

Patches

This has been patched in superjson 1.8.1 and Blitz.js 0.45.3\. 

If you are unable to upgrade to Blitz.js 0.45.3 in a timely manner, you can instead upgrade only superjson to version 1.8.1 using yarn resolutions are similar. Blitz versions < 0.45.3 are only affected because they used superjson versions < 1.8.1.

Workarounds

None

For more information

If you have any questions or comments about this advisory:

- Open an issue in [github.com/blitz-js/superjson](https://github.com/blitz-js/superjson "https://github.com/blitz-js/superjson")
- Email us at b@bayer.ws

References

- [sonarsource.com/blog/blitzjs-prototype-pollutio…](https://www.sonarsource.com/blog/blitzjs-prototype-pollution/ "https://www.sonarsource.com/blog/blitzjs-prototype-pollution/")

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: high
- **Integrity**: high
- **Availability**: high

CVSS:3.1/​AV:N/​AC:H/​PR:N/​UI:N/​S:C/​C:H/​I:H/​A:H

## References

- [Reference](https://github.com/blitz-js/superjson/security/advisories/GHSA-5888-ffcr-r425 "https://github.com/blitz-js/superjson/security/advisories/GHSA-5888-ffcr-r425")  
github.com/blitz-js/superjson/security/advisori…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-23631 "https://nvd.nist.gov/vuln/detail/CVE-2022-23631")  
nvd.nist.gov/vuln/detail/CVE-2022-23631
- [GitHub advisory](https://github.com/advisories/GHSA-5888-ffcr-r425 "https://github.com/advisories/GHSA-5888-ffcr-r425")  
github.com/advisories/GHSA-5888-ffcr-r425
- [Package](https://github.com/blitz-js/superjson "https://github.com/blitz-js/superjson")  
github.com/blitz-js/superjson
- [Reference](https://www.sonarsource.com/blog/blitzjs-prototype-pollution "https://www.sonarsource.com/blog/blitzjs-prototype-pollution")  
sonarsource.com/blog/blitzjs-prototype-pollution

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
