{"id":"CVE-2022-21122","summary":"Arbitrary Code Execution","details":"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.","aliases":["GHSA-5gc4-cx9x-9c43","SNYK-JS-METACALC-2826197"],"modified":"2026-08-12T03:51:40.160401310Z","published":"2022-06-03T20:05:12.139Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21122.json","cna_assigner":"snyk"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21122.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21122"},{"type":"ADVISORY","url":"https://snyk.io/vuln/SNYK-JS-METACALC-2826197"},{"type":"FIX","url":"https://github.com/metarhia/metacalc/commit/625c23d63eabfa16fc815f5832b147b08d2144bd"},{"type":"FIX","url":"https://github.com/metarhia/metacalc/pull/16"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/metarhia/metacalc","events":[{"introduced":"0"},{"fixed":"940be866d58a908507aa61611ba158752175d425"},{"fixed":"625c23d63eabfa16fc815f5832b147b08d2144bd"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"0.0.2"}],"source":["CPE_RANGE","REFERENCES"],"cpe":"cpe:2.3:a:metarhia:metacalc:*:*:*:*:*:*:*:*"}}],"versions":["v0.0.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21122.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/E:P"}]}