CVE-2017-1001003: Arbitrary Code Execution in mathjs

mathjs Updated 02 Oct 2025

Summary

18/12/2017
Yes i
Critical
9.8

CVE-2017-1001003: Arbitrary Code Execution in mathjs. Affects mathjs versions < 3.17.0. Fixed in 3.17.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The mathjs package is an open-source JavaScript library that provides a comprehensive set of mathematical functions and expressions. It is commonly used for mathematical computations in web applications and Node.js environments. The package allows users to perform complex mathematical operations, including symbolic computation, matrix operations, and statistical analysis. However, versions of math.js prior to 3.17.0 are vulnerable to arbitrary code execution due to a flaw in handling private properties during object creation.

Vulnerability Detail

The vulnerability in math.js arises from the ability to replace private properties, such as a constructor, by using Unicode characters when creating an object. This can be exploited by an attacker to execute arbitrary code within the context of the application using math.js. The impact of this vulnerability can be severe, as it allows an attacker to execute malicious code, potentially leading to unauthorized access, data breaches, or system compromise. The vulnerability is classified as critical (CWE-88) and should be addressed immediately.

How To Fix

Latest published version: 15.2.0 as of 22 Oct 2026

npm install mathjs@15.2.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.17.0

This is the first release that contains the fix.

npm install mathjs@3.17.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

In conclusion, the math.js package prior to version 3.17.0 is vulnerable to arbitrary code execution. It is crucial to upgrade to the latest version to mitigate the risk of this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mathjs →

Share this vulnerability

FAQ

Math.js is an open-source JavaScript library that provides a wide range of mathematical functions and expressions for use in web applications and Node.js environments.

The vulnerability allows an attacker to execute arbitrary code within the context of the application using math.js, potentially leading to unauthorized access, data breaches, or system compromise.

To fix this vulnerability, upgrade to math.js version 3.17.0 or later, which includes a fix for the issue.

No workaround is available for this vulnerability. It is recommended to upgrade to the fixed version of math.js.

You can find more information about this vulnerability in the GitHub Security Advisory database: [link to advisory]

Related vulnerabilities

Recent vulnerabilities recorded for mathjs.

How To Fix

Latest published version: 15.2.0 as of 22 Oct 2026

npm install mathjs@15.2.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.17.0

This is the first release that contains the fix.

npm install mathjs@3.17.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback