CVE-2019-16769: Cross-Site Scripting in serialize-javascript

serialize-javascript Updated 02 Oct 2025

Summary

05/12/2019
Yes i
Moderate
4.2

CVE-2019-16769: Cross-Site Scripting in serialize-javascript. Affects serialize-javascript versions < 2.1.1. Fixed in 2.1.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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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. However, versions prior to 2.1.1 are vulnerable to Cross-Site Scripting (XSS) attacks. This vulnerability arises from the package's failure to properly sanitize serialized regular expressions. It is important to note that this vulnerability does not affect Node.js applications.

Vulnerability Detail

The vulnerability in serialize-javascript allows for Cross-Site Scripting (XSS) attacks. An attacker can exploit this vulnerability by injecting malicious code into serialized regular expressions. When this code is deserialized and executed on the client-side, it can lead to unauthorized access, data theft, or other malicious activities. The impact of this vulnerability can vary depending on the context in which the serialized data is used.

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

2.1.1

This is the first release that contains the fix.

npm install serialize-javascript@2.1.1

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 essential to upgrade to the fixed version of the serialize-javascript package to mitigate the risk of XSS attacks.

Conclusion

In conclusion, the serialize-javascript package prior to version 2.1.1 is vulnerable to Cross-Site Scripting (XSS) attacks. It is crucial for developers to upgrade to the fixed version to mitigate the risk of XSS attacks. 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. It is commonly used in web applications to transmit data between the client and server.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to unauthorized access, data theft, or other malicious activities.

This vulnerability affects web applications that use the serialize-javascript package. If the serialized data is not properly sanitized, an attacker can inject malicious code that will be executed on the client-side, potentially leading to XSS attacks.

No, this vulnerability does not affect Node.js applications. It only affects web applications that use the serialize-javascript package.

To protect your application, it is recommended to upgrade to version 2.1.1 or later of the serialize-javascript package. This version includes the necessary fixes to prevent XSS attacks. Additionally, it is good practice to sanitize and validate all user input to prevent injection attacks.

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

2.1.1

This is the first release that contains the fix.

npm install serialize-javascript@2.1.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