CVE-2020-7743: Prototype Pollution in mathjs

mathjs Updated 02 Oct 2025

Summary

10/05/2021
Yes i
High
7.3

CVE-2020-7743: Prototype Pollution in mathjs. Affects mathjs versions < 7.5.1. Fixed in 7.5.1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The mathjs package is an extensive math library for JavaScript that provides a wide range of mathematical functions and expressions. It is commonly used for mathematical computations and evaluations in various applications. However, versions before 7.5.1 are vulnerable to Prototype Pollution through the deepExtend function, which is executed during configuration updates.

Vulnerability Detail

Prototype Pollution is a vulnerability that occurs when an attacker can inject or modify properties of an object's prototype. In the case of mathjs, the deepExtend function is susceptible to this issue. An attacker can manipulate the prototype chain and introduce malicious properties or modify existing ones, leading to unexpected behavior or security breaches. This vulnerability can potentially allow an attacker to execute arbitrary code, escalate privileges, or cause denial-of-service attacks.

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

7.5.1

This is the first release that contains the fix.

npm install mathjs@7.5.1

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

Workaround

There is no known workaround for this vulnerability. It is crucial to update to the fixed version of the mathjs package to mitigate the risk of exploitation.

Conclusion

The Prototype Pollution vulnerability in mathjs can have severe consequences, including arbitrary code execution and privilege escalation. It is crucial to update the mathjs package to version 7.5.1 or later to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for mathjs →

Share this vulnerability

FAQ

Prototype Pollution is a vulnerability that allows an attacker to modify an object's prototype, leading to unexpected behavior or security breaches.

This vulnerability in mathjs can potentially allow an attacker to execute arbitrary code, escalate privileges, or cause denial-of-service attacks.

To fix this vulnerability, update the mathjs package to version 7.5.1 or later using the command 'npm install mathjs@7.5.1'.

There are no known workarounds for this vulnerability. Updating to the fixed version is the recommended solution.

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

7.5.1

This is the first release that contains the fix.

npm install mathjs@7.5.1

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