{"id":"GHSA-5gc4-cx9x-9c43","summary":"Code Injection in metacalc","details":"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.","aliases":["CVE-2022-21122","SNYK-JS-METACALC-2826197"],"modified":"2026-09-10T03:49:49.229146221Z","published":"2022-06-09T00:00:29Z","database_specific":{"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2022-06-09T23:50:50Z","nvd_published_at":"2022-06-08T09:15:00Z","cwe_ids":["CWE-94"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21122"},{"type":"WEB","url":"https://github.com/metarhia/metacalc/pull/16"},{"type":"WEB","url":"https://github.com/metarhia/metacalc/commit/625c23d63eabfa16fc815f5832b147b08d2144bd"},{"type":"PACKAGE","url":"https://github.com/metarhia/metacalc"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-METACALC-2826197"}],"affected":[{"package":{"name":"metacalc","ecosystem":"npm","purl":"pkg:npm/metacalc"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-5gc4-cx9x-9c43/GHSA-5gc4-cx9x-9c43.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"}]}