GHSA-5gc4-cx9x-9c43
Dashboard / Vulnerabilities / GHSA-5gc4-cx9x-9c43
GHSA-5gc4-cx9x-9c43
Published: 9 Jun 2022Last Modified: 10 Sept 2026
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.
References: https://nvd.nist.gov/vuln/detail/CVE-2022-21122, https://github.com/metarhia/metacalc/pull/16, https://github.com/metarhia/metacalc/commit/625c23d63eabfa16fc815f5832b147b08d2144bd, https://github.com/metarhia/metacalc, https://snyk.io/vuln/SNYK-JS-METACALC-2826197
Affected packages
Package
Name: metacalc
Purl: pkg:npm/metacalc
Affected ranges
Type: SEMVER
Events:
Introduced- 0
Fixed -0.0.2
Affected versions
Common Vulnerability Scoring System
Attack Vector
Network
Adjacent
Local
Physical
Privileges Required
None
Low
High
User Interaction
None
Required
Scope
Unchanged
Changed
Confidentiality
None
Low
High
Integrity
None
Low
High
Availability
None
Low
High
