Vulnerability · Published Apr 24, 2026 · Assigned by GitHub_M

CVE-2026-40897Math.js: Unsafe object property setter in mathjs

High 8.8

In plain English

A high-severity expression language injection in mathjs from josdejong. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 46% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)0.6%top 53.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official description

Math.js is an extensive math library for JavaScript and Node.js. From 13.1.1 to before 15.2.0, a vulnerability allowed executing arbitrary JavaScript via the expression parser of mathjs. You can be affected when you have an application where users can evaluate arbitrary expressions using the mathjs expression parser. This vulnerability is fixed in 15.2.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmmathjs15.2.0GHSA-29qv-4j9f-fjw5

Affected products (as reported)

VendorProductVersions
josdejong mathjs >= 13.1.1, < 15.2.0

Weakness: CWE-915, CWE-917 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References