Skip to content

Code Injection in metacalc

Critical severity GitHub Reviewed Published Jun 9, 2022 to the GitHub Advisory Database • Updated Jan 27, 2023

Package

npm metacalc (npm)

Affected versions

< 0.0.2

Patched versions

0.0.2

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.

References

Published by the National Vulnerability Database Jun 8, 2022
Published to the GitHub Advisory Database Jun 9, 2022
Reviewed Jun 9, 2022
Last updated Jan 27, 2023

Severity

Critical
9.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2022-21122

GHSA ID

GHSA-5gc4-cx9x-9c43

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.