{"id":"CVE-2022-21122","aliases":["EUVD-2022-5939","GHSA-5gc4-cx9x-9c43","SNYK-JS-METACALC-2826197"],"status":"published","title":"Arbitrary Code Execution","description":"The package metacalc before 0.0.2 are vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","severity":{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.02683,"percentile":0.86021,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94"],"published":"2022-06-03T20:05:12Z","modified":"2026-10-28T02:30:29Z","fixes":[{"ecosystem":"npm","package":"metacalc","fixed_in":["0.0.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"metacalc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.2"}]}]},{"source":"osv","ecosystem":"npm","package":"metacalc","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.2"}]}]}],"products":[{"vendor":"metarhia","product":"metacalc"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-METACALC-2826197","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/metarhia/metacalc/pull/16","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/metarhia/metacalc/commit/625c23d63eabfa16fc815f5832b147b08d2144bd","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21122","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5gc4-cx9x-9c43"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21122.json","tags":["advisory"]},{"url":"https://github.com/metarhia/metacalc","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-21122","title":"Arbitrary Code Execution","description":"The package metacalc before 0.0.2 are vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","status":"published","published":"2022-06-03T20:05:12.139Z","modified":"2024-09-16T19:56:29.255Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P","level":"critical","assessor":"cna"}],"updated_at":"2026-11-02T14:34:29.057251Z"}],"euvd":[{"id":"EUVD-2022-5939","description":"The package metacalc before 0.0.2 are vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","status":"published","published":"2022-06-03T20:05:12Z","modified":"2024-09-16T19:56:29Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P","level":"critical"}],"updated_at":"2026-11-03T00:55:18.708292Z"}],"ghsa":[{"id":"GHSA-5gc4-cx9x-9c43","title":"Code Injection in metacalc","description":"The package metacalc before 0.0.2 is vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","status":"published","published":"2022-06-09T00:00:29Z","modified":"2023-01-27T05:03:40Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:36:20.144464Z"}],"nvd":[{"id":"CVE-2022-21122","description":"The package metacalc before 0.0.2 are vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","status":"published","published":"2022-06-08T09:15:08.47Z","modified":"2026-06-17T04:25:33.693Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:07:21.62951Z"}],"osv":[{"id":"CVE-2022-21122","title":"Arbitrary Code Execution","description":"The package metacalc before 0.0.2 are vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","status":"published","published":"2022-06-03T20:05:12.139Z","modified":"2026-10-28T02:30:29.731953704Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P","level":"critical"}],"updated_at":"2026-11-02T15:44:23.655778Z"},{"id":"GHSA-5gc4-cx9x-9c43","title":"Code Injection in metacalc","description":"The package metacalc before 0.0.2 is vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.","status":"published","published":"2022-06-09T00:00:29Z","modified":"2026-09-10T03:49:49.229146221Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:38.213481Z"}]}}
