# serialize-to-js denial of service

Source: https://junglewise.ai/threats/serialize-to-js-denial-of-service-133dbaec  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-09-02. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: info · Published 2020-09-02

serialize-to-js is a JavaScript utility library for converting objects into serialized strings. The library is vulnerable to denial of service attacks where maliciously crafted input can cause the application to hang indefinitely, disrupting service availability for all users.

Technologies: [serialize-to-js (npm)](https://junglewise.ai/threats/technologies/serialize-to-js). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 2 September 2020.

**Which products and versions are affected?** serialize-to-js (npm) SEMVER:introduced=0,fixed=2.0.0.

**Is there a fix for This vulnerability?** Yes. serialize-to-js (npm): upgrade to 2.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network.

**Am I affected?** Check whether you run serialize-to-js (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- serialize-to-js (npm): upgrade to 2.0.0 or later

  ```sh
  npm install serialize-to-js@2.0.0
  ```


## Technical details

serialize-to-js prior to version 2.0.0 contains a denial of service vulnerability stemming from improper input validation. Attackers can craft specific inputs that trigger infinite loops during the serialization process, causing the application to hang. The vulnerability affects all versions prior to the fix in version 2.0.0. No special authentication or complex preconditions are required—any user able to provide input to the serialize function can trigger the DoS condition.

## Affected products

- serialize-to-js serialize-to-js prior to 2.0.0

## Timeline

- 2020-09-02: disclosed
- 2020-09-02: patched: Fixed in version 2.0.0

## References

- [https://www.npmjs.com/advisories/790](https://www.npmjs.com/advisories/790)

## Related threats

- [commenthol serialize-to-js XSS in serialized regular expressions](https://junglewise.ai/threats/cve-2019-16772-commenthol-serialize-to-js-xss-in-serialized-regular-expressions)
- [serialize-to-js arbitrary code execution through IIFE](https://junglewise.ai/threats/cve-2017-5954-serialize-to-js-arbitrary-code-execution-through-iife)
