CVE-2020-7660: Insecure serialization leading to RCE in serialize-javascript

serialize-javascript Updated 02 Oct 2025

Summary

11/08/2020
Yes i
High
8.1

CVE-2020-7660: Insecure serialization leading to RCE in serialize-javascript. Affects serialize-javascript versions < 3.1.0. Fixed in 3.1.0. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The serialize-javascript package is an npm package used for serializing JavaScript objects into a string representation. It is commonly used in web applications to transmit data between the client and server. The package provides a function called 'serialize' that takes an object as input and returns a string representation of that object. This package is vulnerable to an insecure serialization vulnerability that can lead to remote code execution (RCE).

Vulnerability Detail

The vulnerability in serialize-javascript prior to version 3.1.0 allows remote attackers to inject arbitrary code via the 'deleteFunctions' function within 'index.js'. An attacker can exploit this vulnerability by providing a specially crafted object for serialization. By controlling the values of both 'foo' and 'bar' properties in the object, and guessing the value of the '<UID>' placeholder, the attacker can escape the 'bar' key and inject arbitrary code. This vulnerability has a high severity rating with a CVSS score of 8.1.

How To Fix

Latest published version: 7.1.3 as of 22 Oct 2026

npm install serialize-javascript@7.1.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.1.0

This is the first release that contains the fix.

npm install serialize-javascript@3.1.0

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

Workaround

There is no known workaround for this vulnerability. It is recommended to update to the latest version of the serialize-javascript package as soon as possible.

Conclusion

The serialize-javascript package prior to version 3.1.0 is vulnerable to an insecure serialization vulnerability that can lead to remote code execution. Developers should update to the latest version of the package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for serialize-javascript →

Share this vulnerability

FAQ

Serialize-javascript is an npm package used for serializing JavaScript objects into a string representation.

This vulnerability allows remote attackers to inject arbitrary code, potentially leading to remote code execution.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your package-lock.json file and the playground will analyze it for vulnerabilities.

Yes, developers should update the serialize-javascript package to version 3.1.0 or later to fix this vulnerability.

There are no known workarounds for this vulnerability. It is recommended to update to the latest version of the serialize-javascript package.

Related vulnerabilities

Recent vulnerabilities recorded for serialize-javascript.

How To Fix

Latest published version: 7.1.3 as of 22 Oct 2026

npm install serialize-javascript@7.1.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.1.0

This is the first release that contains the fix.

npm install serialize-javascript@3.1.0

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