Arbitrary Code Execution Affecting mathjs package, versions <3.11.5


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDnpm:mathjs:20170402
  • published28 Jan 2018
  • disclosed2 Apr 2017
  • creditKonrad Borowski, Joe Vennix, comex

Introduced: 2 Apr 2017

CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade mathjs to version 3.11.5 or higher.

Overview

mathjs is an extensive math library for JavaScript and Node.js.

Affected versions of the package are vulnerable to Arbitrary Code Execution.

The expression parser in mathjs uses the eval and the new Function methods insecurely which could allow an attacker to execute arbitrary code on the remote server.

this is due to an incomplete fix for npm:mathjs:20170331.

CVSS Scores

version 3.1