What’s Vulnerable › Vulnerabilities
CVE-2022-21122: Arbitrary Code Execution
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-06-08 · updated 2026-06-17
- Weakness: CWE-94
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.
Affected products
- metacalc: before 0.0.2 — fixed in 0.0.2
How to fix
Upgrade to a fixed version: metacalc 0.0.2. Check the vendor advisory for mitigations.
References
- https://github.com/metarhia/metacalc/commit/625c23d63eabfa16fc815f5832b147b08d2144bd
- https://github.com/metarhia/metacalc/pull/16
- https://snyk.io/vuln/SNYK-JS-METACALC-2826197
- https://github.com/metarhia/metacalc/commit/625c23d63eabfa16fc815f5832b147b08d2144bd
- https://github.com/metarhia/metacalc/pull/16
- https://snyk.io/vuln/SNYK-JS-METACALC-2826197
Get alerted when CVE-2022-21122 or the next vulnerability affects your stack