Packages / superjson / Security

CriticalVulnerabilityGHSA-5888-ffcr-r425CVE-2022-23631Published 9 Feb 2022

Prototype Pollution leading to Remote Code Execution in superjson

Your version

Affected releases · superjson

  • 1.x1.0.0 – 1.8.0Fixed in 1.8.1
  • 0.0.x0.0.1 – 0.0.6No 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:

References

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.