Prototype poisoning
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Tampering
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-915.
Summary
msgpack5 is a msgpack v5 implementation for node.js and the browser. In msgpack5 before versions 3.6.1, 4.5.1, and 5.2.1 there is a "Prototype Poisoning" vulnerability. When msgpack5 decodes a map containing a key "__proto__", it assigns the decoded value to __proto__. Object.prototype.__proto__ is an accessor property for the receiver's prototype. If the value corresponding to the key __proto__ decodes to an object or null, msgpack5 sets the decoded object's prototype to that value. An attacker who can submit crafted MessagePack data to a service can use this to produce values that appear to be of other types; may have unexpected prototype properties and methods (for example length, numeric properties, and push et al if __proto__'s value decodes to an Array); and/or may throw unexpected exceptions when used (for example if the __proto__ value decodes to a Map or Date). Other unexpected behavior might be produced for other types. There is no effect on the global prototype. This "prototype poisoning" is sort of a very limited inversion of a prototype pollution attack. Only the decoded value's prototype is affected, and it can only be set to msgpack5 values (though if the victim makes use of custom codecs, anything could be a msgpack5 value). We have not found a way to escalate this to true prototype pollution (absent other bugs in the consumer's code). This has been fixed in msgpack5 version 3.6.1, 4.5.1, and 5.2.1. See the referenced GitHub Security Advisory for an example and more details.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mcollina | msgpack5 | before 3.6.1; 4.0.0 to before 4.5.1; 5.0.0 to before 5.2.1 | 3.6.1, 4.5.1, 5.2.1 | Patch available | CNA |
| — | msgpack5 (npm) | before 3.6.1 | 3.6.1 | Patch available | GHSA-gmjw-49p4-pcfm |
| — | msgpack5 (npm) | 4.0.0 to before 4.5.1 | 4.5.1 | Patch available | GHSA-gmjw-49p4-pcfm |
| — | msgpack5 (npm) | 5.0.0 to before 5.2.1 | 5.2.1 | Patch available | GHSA-gmjw-49p4-pcfm |
- msgpack5 Vendormcollina Affected before 3.6.1; 4.0.0 to before 4.5.1; 5.0.0 to before 5.2.1 Fixed in 3.6.1, 4.5.1, 5.2.1 Patch available CNA
- msgpack5 (npm) Vendor— Affected before 3.6.1 Fixed in 3.6.1 Patch available GHSA-gmjw-49p4-pcfm
- msgpack5 (npm) Vendor— Affected 4.0.0 to before 4.5.1 Fixed in 4.5.1 Patch available GHSA-gmjw-49p4-pcfm
- msgpack5 (npm) Vendor— Affected 5.0.0 to before 5.2.1 Fixed in 5.2.1 Patch available GHSA-gmjw-49p4-pcfm
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:msgpack5_project:msgpack5:*:*:*:*:*:node.js:*:* | before 3.6.1; 4.0.0 to before 4.5.1; 5.0.0 to before 5.2.1 | Vulnerable | Msgpack5 Project |
- cpe:2.3:a:msgpack5_project:msgpack5:*:*:*:*:*:node.js:*:* Versions before 3.6.1; 4.0.0 to before 4.5.1; 5.0.0 to before 5.2.1 Vulnerable ·Msgpack5 Project
Remediation
- Fix · CNA msgpack5 (mcollina) Fixed in 3.6.1, 4.5.1, 5.2.1
- Fix · GHSA-gmjw-49p4-pcfm msgpack5 (npm) Fixed in 3.6.1 Advisory →
- Fix · GHSA-gmjw-49p4-pcfm msgpack5 (npm) Fixed in 4.5.1 Advisory →
- Fix · GHSA-gmjw-49p4-pcfm msgpack5 (npm) Fixed in 5.2.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21368
- 2026-10-03 Alias added: GHSA-gmjw-49p4-pcfm
References
More mcollina vulnerabilities
- TI-2026-76780 Command injection in mcollina mcp-ripgrep Advanced Search Tool CVSS 4.0MEDIUM 4.8
- TI-2026-69605 Truncated map32 headers throw RangeError in msgpack5 decoder CVSS 3.1HIGH 7.5
- TI-2026-69603 msgpack5 streaming decoder recursion can exhaust the call stack CVSS 3.1HIGH 7.5
- TI-2026-69599 Deeply nested input exhausts the stack in msgpack5 decoder CVSS 3.1MEDIUM 5.3
- TI-2026-69606 Prototype pollution in msgpack5 with partial options CVSS 3.1MEDIUM 6.5
- TI-2026-69609 Quadratic parsing in msgpack5 streaming decoder blocks the event loop CVSS 3.1MEDIUM 5.9
Sources
- CVE-2021-21368 · CVE Program
- CVE-2021-21368 · NVD
- FIRST EPSS
- GHSA-gmjw-49p4-pcfm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences