Quick answers
- Is CVE-2021-21368 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-21368 being exploited in the wild.
- How severe is CVE-2021-21368?
- Low severity, with a CVSS score of 3.1, published 12 March 2021.
- Which products and versions are affected?
- msgpack5 (npm) SEMVER:introduced=0,fixed=3.6.1.
- Is there a fix for CVE-2021-21368?
- Yes. msgpack5 (npm): upgrade to 3.6.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-21368 attacked?
- It is attacked over the network.
- Am I affected by CVE-2021-21368?
- Check whether you run msgpack5 (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
- msgpack5 (npm): upgrade to 3.6.1 or later
npm install msgpack5@3.6.1
Technical details
The vulnerability is a prototype poisoning flaw in the map decoding logic of msgpack5. When msgpack5 decodes a MessagePack map containing a "__proto__" key, it assigns the decoded value directly to the object's __proto__ property, overwriting the object's prototype chain. The attack requires network-reachable access to submit crafted MessagePack payloads and low privileges (or ability to send data to the service). An attacker can craft payloads where the "__proto__" value decodes to an object (such as a Map or Array), causing the decoded object to masquerade as that type while failing when actual type-specific methods are invoked. The issue does not affect the global prototype and is limited to individual decoded objects. Patches are available in versions 3.6.1, 4.5.1, and 5.2.1.
Affected products
- msgpack5 msgpack5 < 3.6.1, 4.0.0 to < 4.5.1, 5.0.0 to < 5.2.1
Identifiers
- CVE-2021-21368
- GHSA-gmjw-49p4-pcfm
Timeline
- 2021-03-09: disclosed
- 2021-03-12: patched: Patches released in versions 3.6.1, 4.5.1, and 5.2.1