Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2026-40897: Math.js is an extensive math library for JavaScript and Node.js

42
This month
HIGH 8.8UPGRADE

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.

Risk facts

CVSS score8.8 (High)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededLow
User interactionNone
EPSS exploit chance0.6% (top 54%)
CISA exploited listNo
WeaknessCWE-915, CWE-917
Published2026-04-24
Last modified2026-10-26
Publisher (CNA): GitHub, Inc. · Vendor: mathjs

Share: LinkedIn · X · Reddit

Last updated 2026-10-26 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

mathjs mathjs UPGRADE
Affected: >= 13.1.1 and < 15.2.0
Fixed in: 15.2.0
Safe to downgrade to: a release before 13.1.1
1. Check installed version
npm ls mathjs
2. UPGRADE to 15.2.0
npm install mathjs@">=15.2.0"
3. If no update is available yet, DOWNGRADE to a release before 13.1.1
npm view mathjs versions npm install mathjs@"<13.1.1"
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
Verify at the official source NVD · CVE Program · Report a problem with this page
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

Node.js vulnerabilities

Related CVEs

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.