CVE-2020-7743: mathjs prototype pollution in deepExtend

CVE-2020-7743 · Severity: low · CVSS 3.1 · Published 2021-05-10

mathjs is a JavaScript mathematics library used in web applications and data processing workflows. A prototype pollution vulnerability in the configuration update mechanism allows attackers to modify core JavaScript object properties, potentially leading to unexpected application behavior, denial of service, or information disclosure depending on how the affected application uses the library.

Technologies: mathjs (npm). Vendors: npm.

Quick answers

Is CVE-2020-7743 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2020-7743 being exploited in the wild.
How severe is CVE-2020-7743?
Low severity, with a CVSS score of 3.1, published 10 May 2021.
Which products and versions are affected?
mathjs (npm) SEMVER:introduced=0,fixed=7.5.1.
Is there a fix for CVE-2020-7743?
Yes. mathjs (npm): upgrade to 7.5.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2020-7743 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2020-7743?
Check whether you run mathjs (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • mathjs (npm): upgrade to 7.5.1 or later
    npm install mathjs@7.5.1

Technical details

The vulnerability is a prototype pollution flaw (CWE-915) in the deepExtend function called during mathjs configuration updates. The vulnerability allows an attacker to inject properties into JavaScript's Object prototype by crafting malicious configuration payloads. No authentication or special privileges are required; the attack can be triggered remotely via network if the application exposes configuration update functionality. An attacker can pollute the prototype to corrupt application state, bypass security checks, or cause denial of service. The vulnerability was patched in version 7.5.1 via commit ecb8051, which adds proper validation to prevent prototype pollution during object extension.

Affected products

  • mathjs mathjs before 7.5.1

Identifiers

  • CVE-2020-7743
  • GHSA-x2fc-mxcx-w4mf

Timeline

  • 2020-10-13: disclosed: CVE-2020-7743 published on NVD
  • 2020-10-10: patched: Version 7.5.1 released with fix
  • 2021-05-10: advisory: GHSA-x2fc-mxcx-w4mf published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.