CVE-2022-23631: Prototype Pollution leading to Remote Code Execution in superjson

superjson Updated 02 Oct 2025

Summary

09/02/2022
Yes i
Critical
9.0

CVE-2022-23631: Prototype Pollution leading to Remote Code Execution in superjson. Affects superjson versions < 1.8.1. Fixed in 1.8.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

superjson is an npm package that provides a secure way to serialize and deserialize JSON data. It is commonly used in web applications, including frameworks like Blitz.js. The vulnerability in superjson allows attackers to exploit prototype pollution, which can lead to remote code execution on servers that use superjson for request processing. This vulnerability poses a critical risk as it enables attackers to gain full control over the server, potentially compromising data and launching further attacks.

Vulnerability Detail

The vulnerability arises from a prototype pollution issue in superjson. By manipulating the input data, an attacker can inject malicious code that gets executed on the server. This can be done without authentication or prior knowledge, as long as the server implements at least one endpoint that uses superjson. For example, in the case of Blitz.js, an RPC call would be sufficient. The impact of this vulnerability is severe, as it allows attackers to steal and manipulate data, as well as launch attacks on other systems. The vulnerability has been assigned a CVSS score of 9.0, indicating its high severity.

How To Fix

Minimum fixed version

1.8.1

This is the first release that contains the fix.

npm install superjson@1.8.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The vulnerability in superjson poses a critical risk to servers using this package, especially in conjunction with frameworks like Blitz.js. Upgrading to the patched versions of superjson and Blitz.js is crucial to mitigate the risk of remote code execution and potential data theft. For further support and assistance in vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for superjson →

Share this vulnerability

FAQ

The vulnerability allows attackers to execute arbitrary code on servers using superjson, including Blitz.js servers. This grants them full control over the server, enabling data theft, manipulation, and potential attacks on other systems.

To fix the vulnerability, upgrade to the patched versions of superjson (1.8.1) and Blitz.js (0.45.3). If immediate upgrade to Blitz.js 0.45.3 is not possible, upgrade only superjson to version 1.8.1 using yarn resolutions or a similar package management tool.

No, there are no known workarounds for this vulnerability. Upgrading to the patched versions is the recommended solution.

For more information, you can open an issue in the superjson GitHub repository or email the developers at b@bayer.ws.

Versions of superjson prior to 1.8.1 and versions of Blitz.js prior to 0.45.3 are affected by this vulnerability.

How To Fix

Minimum fixed version

1.8.1

This is the first release that contains the fix.

npm install superjson@1.8.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback