{"id":"EUVD-2021-0658","revision":null,"records":[{"revision":"3525b97c0b3d4dc3a131160265ae319d","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2021-21368","aliases":[],"title":"Prototype poisoning","description":"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.","state":0,"publishedAt":"2021-03-12T17:00:19+00:00","modifiedAt":"2024-08-03T18:09:15.915+00:00","affected":[{"ecosystem":"Vendor product","name":"msgpack5","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"msgpack5\",\n                    \"vendor\": \"mcollina\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"< 3.6.1\"\n                        },\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \">= 4.0.0, < 4.5.1\"\n                        },\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \">= 5.0.0, < 5.2.1\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:H","score":6.7,"severity":"MEDIUM"}],"references":["https://github.com/mcollina/msgpack5/security/advisories/GHSA-gmjw-49p4-pcfm","https://www.npmjs.com/package/msgpack5","https://github.com/mcollina/msgpack5/releases/tag/v3.6.1","https://github.com/mcollina/msgpack5/releases/tag/v4.5.1","https://github.com/mcollina/msgpack5/releases/tag/v5.2.1","https://github.com/mcollina/msgpack5/commit/d4e6cb956ae51c8bb2828e71c7c1107c340cf1e8"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2021-21368","license":"CVE Program Terms of Use","key":"cve-program:CVE-2021-21368","identifiers":["CVE-2021-21368"]},"retained":false,"historicalAffected":[]},{"revision":"95744f41defc4d6783a9f93e8f60aa5a","observedAt":"2026-11-18T01:43:03.811+00:00","statement":{"source":"euvd","id":"EUVD-2021-0658","aliases":["CVE-2021-21368","GHSA-gmjw-49p4-pcfm"],"title":"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 th…","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:H","score":6.7,"severity":null}],"references":["https://github.com/mcollina/msgpack5/security/advisories/GHSA-gmjw-49p4-pcfm","https://www.npmjs.com/package/msgpack5","https://github.com/mcollina/msgpack5/releases/tag/v3.6.1","https://github.com/mcollina/msgpack5/releases/tag/v4.5.1","https://github.com/mcollina/msgpack5/releases/tag/v5.2.1","https://github.com/mcollina/msgpack5/commit/d4e6cb956ae51c8bb2828e71c7c1107c340cf1e8"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-0658","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Mar 12, 2021, 5:00:19 PM","dateUpdated":"Aug 3, 2024, 6:09:15 PM"},"relatedAdvisories":[{"id":"msrc_CVE-2021-21368","title":"Prototype poisoning","vulnerabilityIds":["CVE-2021-21368"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2021-0658","identifiers":["EUVD-2021-0658","CVE-2021-21368","GHSA-gmjw-49p4-pcfm"]},"retained":false,"historicalAffected":[]},{"revision":"e15d499491b340359f39bc67f301240e","observedAt":"2026-10-24T17:17:33.481+00:00","statement":{"source":"nvd","id":"CVE-2021-21368","aliases":[],"title":"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 th…","description":"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.","state":0,"publishedAt":"2021-03-12T17:15:12.863+00:00","modifiedAt":"2026-06-17T03:35:24.303+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:H","score":6.7,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"},{"system":"CVSS 2.0 · nvd@nist.gov · Primary","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/mcollina/msgpack5/commit/d4e6cb956ae51c8bb2828e71c7c1107c340cf1e8","https://github.com/mcollina/msgpack5/releases/tag/v3.6.1","https://github.com/mcollina/msgpack5/releases/tag/v4.5.1","https://github.com/mcollina/msgpack5/releases/tag/v5.2.1","https://github.com/mcollina/msgpack5/security/advisories/GHSA-gmjw-49p4-pcfm","https://www.npmjs.com/package/msgpack5"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-21368","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-915","CWE-1321"],"productCriteria":["cpe:2.3:a:msgpack5_project:msgpack5:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2021-03-12T17:15:12.863","lastModified":"2026-06-17T03:35:24.303"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2021-21368","identifiers":["CVE-2021-21368"]},"retained":false,"historicalAffected":[]},{"revision":"9f36fc0e05974d518885ac82122c5ca6","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-gmjw-49p4-pcfm","aliases":["CVE-2021-21368"],"title":"Prototype poisoning","description":"### Impact\n\nThe issue is as follows: when `msgpack5` decodes a map containing a \nkey `\"__proto__\"`, it assigns the decoded value to `__proto__`. As you \nare no doubt aware, `Object.prototype.__proto__` is an accessor \nproperty for the receiver's prototype. If the value corresponding to \nthe key `__proto__` decodes to an object or `null`, `msgpack5` sets \nthe decoded object's prototype to that value. \n\nAn attacker who can submit crafted MessagePack data to a service can \nuse this to produce values that appear to be of other types; may have \nunexpected prototype properties and methods (for example `length`, \nnumeric properties, and `push` et al if `__proto__`'s value decodes to \nan `Array`); and/or may throw unexpected exceptions when used (for \nexample if the `__proto__` value decodes to a `Map` or `Date`). Other \nunexpected behavior might be produced for other types. \n\nThere is no effect on the global prototype.\n\nAn example: \n\n```js \nconst msgpack5 = require('msgpack5')(); \n\nconst payload = {}; \nObject.defineProperty(payload, '__proto__', { \nvalue: new Map().set(1, 2), \nenumerable: true \n}); \n\nconst encoded = msgpack5.encode(payload); \nconsole.log(encoded); // <Buffer 81 a9 5f 5f 70 72 6f 74 6f 5f 5f 81 01 02> \n\nconst decoded = msgpack5.decode(encoded); \n\n// decoded's prototype has been overwritten \nconsole.log(Object.getPrototypeOf(decoded)); // Map(1) { 1 => 2 } \nconsole.log(decoded.get); // [Function: get] \n\n// decoded appears to most common typechecks to be a Map \nconsole.log(decoded instanceof Map); // true \nconsole.log(decoded.toString()); // [object Map] \nconsole.log(Object.prototype.toString.call(decoded)); // [object Map] \nconsole.log(decoded.constructor.name); // Map \nconsole.log(Object.getPrototypeOf(decoded).constructor.name); // Map \n\n// decoded is not, however, a Map \nconsole.log(Object.getPrototypeOf(decoded) === Map.prototype); // false \n\n// using decoded as though it were a Map throws \ntry { \ndecoded.get(1); \n} catch (error) { \nconsole.log(error); // TypeError: Method Map.prototype.get called \n// on incompatible receiver #<Map> \n} \ntry { \ndecoded.size; \n} catch (error) { \nconsole.log(error); // TypeError: Method get Map.prototype.size \n// called on incompatible receiver #<Map> \n} \n\n// re-encoding the decoded value throws \ntry { \nmsgpack5.encode(decoded); \n} catch (error) { \nconsole.log(error); // TypeError: Method Map.prototype.entries \n// called on incompatible receiver #<Map> \n} \n``` \n\nThis \"prototype poisoning\" is sort of a very limited inversion of a \nprototype pollution attack. Only the decoded value's prototype is \naffected, and it can only be set to `msgpack5` values (though if the \nvictim makes use of custom codecs, anything could be a `msgpack5` \nvalue). We have not found a way to escalate this to true prototype \npollution (absent other bugs in the consumer's code). \n\n### Patches\n\nVersions v5.2.1, v4.5.1, v3.6.1 include the fix.\n\n### Workarounds\n\nAlways validate incoming data after parsing before doing any processing.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)","state":0,"publishedAt":"2021-03-12T22:44:17+00:00","modifiedAt":"2026-09-10T03:49:01.9753172+00:00","affected":[{"ecosystem":"npm","name":"msgpack5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.6.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"msgpack5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.0"},{"kind":"fixed","version":"4.5.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"msgpack5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0"},{"kind":"fixed","version":"5.2.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/mcollina/msgpack5/security/advisories/GHSA-gmjw-49p4-pcfm","https://nvd.nist.gov/vuln/detail/CVE-2021-21368","https://github.com/mcollina/msgpack5/commit/d4e6cb956ae51c8bb2828e71c7c1107c340cf1e8","https://github.com/mcollina/msgpack5/releases/tag/v3.6.1","https://github.com/mcollina/msgpack5/releases/tag/v4.5.1","https://github.com/mcollina/msgpack5/releases/tag/v5.2.1","https://www.npmjs.com/package/msgpack5"],"sourceUrl":"https://github.com/advisories/GHSA-gmjw-49p4-pcfm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-gmjw-49p4-pcfm","identifiers":["GHSA-gmjw-49p4-pcfm","CVE-2021-21368"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T06:24:22.7088152+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T06:24:22.7088152+00:00","lastSuccessAt":"2026-11-19T06:24:22.8754391+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.8754399+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-42f061bddbd482fb0fdcbfdaef32a6fe691ccebc959e217807f38a7ec448390c","complete":true,"records":428247,"lastAttemptAt":"2026-11-19T06:22:43.7183085+00:00","lastSuccessAt":"2026-11-19T06:22:43.6605476+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:22:43.7183085+00:00","snapshotPublishedAt":"2026-11-19T05:24:53+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-083dc80a6b0d4f35b068331bf39b5727","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T06:32:59.6292222+00:00","lastSuccessAt":"2026-11-19T06:32:59.625+00:00","error":"208 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T06:32:59.625+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13581,"expectedIdentifiers":13908,"failedIdentifiers":208},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T06:24:22.7088152+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T06:24:22.7088152+00:00","lastSuccessAt":"2026-11-19T06:24:22.8762559+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.8762561+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T06:24:23.3874789+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T06:24:22.665091+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.665091+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T06:22:43.8470822+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:22:43.8470822+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T06:24:22.6784424+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.6784424+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-79ba98249fc096fffe991a6a897ec91d79aa0bbce455566e233ea218d4eb3d8e","complete":true,"records":232711,"lastAttemptAt":"2026-11-19T06:24:22.5400107+00:00","lastSuccessAt":"2026-11-19T06:24:21.5299094+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.5400107+00:00","snapshotPublishedAt":"2026-11-19T05:48:03+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}