CVE-2017-1001002 Arbitrary Code Execution in mathjs
Attackers can execute arbitrary code by crafting malicious function names in the math.js library, requiring developers to upgrade to a patched version.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2017-1001002?
CVE-2017-1001002 is a critical code injection vulnerability in math.js, published on 27 Nov 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
math.js before 3.17.0 had an arbitrary code execution in the JavaScript engine. Creating a typed function with JavaScript code in the name could result arbitrary execution.
Weakness: CWE-94
Which versions are affected by CVE-2017-1001002?
2 open source packages ship an affected version, including mathjs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mathjs npm | All versions | 3.17.0 |
mathjs npm | All versions | 3.17.0 |
Products include Mathjs Math.js.
How do I fix CVE-2017-1001002?
Upgrade mathjs to 3.17.0 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2017-1001002 being exploited?
There is no known exploitation of CVE-2017-1001002 in the wild and no public exploit code.
Sources
Also known as GHSA-vx5c-87qx-cv6c.