CVE-2022-23631 — superjson
CRITICALCVE-2022-23631 is a critical-severity (CVSS 9) Code Injection vulnerability in superjson. 3 public exploit references exist, so weaponization risk is real. A fix is available for superjson — see the affected versions and patch details below.
Prototype Pollution leading to Remote Code Execution in superjson
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2022-23631 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 384,189 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
superjsonnpmblitznpmDescription
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 https://github.com/blitz-js/superjson
- Email us at [email protected]
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | superjson | all versions | 1.8.1npm install superjson@1.8.1 |
| 📦npm | blitz | all versions | 0.45.3npm install blitz@0.45.3 |
Affected Products
blitzblitzjssuperjsonblitzjsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for superjson, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update superjson to 1.8.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-23631 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2022-23631 in your dependencies?
Find it across npm, including transitive dependencies.