CVE-2026-40897: Math.js is an extensive math library for JavaScript and Node.js
CVE-2026-40897 is a high-severity flaw (CVSS 8.8) affecting mathjs. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- High severity
A fixed release or distro patch exists.
Last updated 2026-10-26 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-40897?
mathjs: upgrade to 15.2.0. Exact commands for each OS are on this page.
Is CVE-2026-40897 being exploited?
CVE-2026-40897 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-40897 affect?
CVE-2026-40897 affects mathjs. Severity is high (CVSS 8.8). 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 wher
How urgent is CVE-2026-40897?
Priority 42/100. High severity
Software pages
Related CVEs
- CVE-2026-41139 HIGH 8.8 UPGRADE Math.js is an extensive math library for JavaScript and Node.js