CVE-2026-40897 json
Math.js: Unsafe object property setter in mathjs
published 2026-04-16 6 mo ago modified 2026-10-26 13 d ago also EUVD-2026-25571 , GHSA-29qv-4j9f-fjw5
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 46%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm mathjs 15.2.0
- mathjs math.js 15.2.0
- mathjs mathjs 15.2.0
- github.com/josdejong/mathjs@513ab2a commit
- github.com/josdejong/mathjs#3656 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-40897 updated cvss 8.8
mathjs: Math.js: Arbitrary code execution via expression parser
-
Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9 Red Hat Enterprise Linux 8 qt5-qtbase, qt5-qtbase-gui, qt5-qtbase-odbc, qt5-qtbase-mysql, qt5-qtbase-common, qt5-qtbase-examples, +1 more Red Hat Enterprise Linux 9 qt5-qtbase, qt5-qtbase-gui, qt5-qtbase-odbc, qt5-qtbase-mysql, qt5-qtbase-common, qt5-qtbase-examples, +1 more Red Hat Enterprise Linux 10 qt6-qtbase Red Hat OpenShift AI (RHOAI) rhoai/odh-dashboard-rhel9, rhoai/odh-mod-arch-maas-rhel9, rhoai/odh-mod-arch-gen-ai-rhel9, rhoai/odh-mod-arch-model-registry-rhel9 Red Hat OpenShift Container Platform 4 openshift4/ose-monitoring-plugin-rhel9not affected: vulnerable code not present
+1 more productsfewer
Red Hat Self-service automation portal 2 ansible-automation-platform/automation-portal
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 6 mo ago
Exploit prediction
0.55% chance of exploitation in the next 30 days, higher than 46% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA ADP | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | mathjs | >=13.1.1, <15.2.0 |
15.2.0 |
Affected products
- josdejong mathjs
- Red Hat Red Hat Developer Hub
- Red Hat Red Hat Enterprise Linux 10
- Red Hat Red Hat Enterprise Linux 8
- Red Hat Red Hat Enterprise Linux 9
- Red Hat Red Hat OpenShift AI (RHOAI)
- Red Hat Red Hat OpenShift Container Platform 4
- Red Hat Self-service automation portal 2
Classification
References
-
github.com
/josdejong/mathjs/pull/3656
web, issue-tracking
-
github.com
/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad
web, patch
-
github.com
/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5
web, vendor-advisory
-
access.redhat.com
/security/cve/CVE-2026-40897
vdb-entry
-
bugzilla.redhat.com
/show_bug.cgi?id=2461612
issue-tracking
- security.access.redhat.com /data/csaf/v2/vex/2026/cve-2026-40897.json
-
nvd.nist.gov
/vuln/detail/CVE-2026-40897
advisory
-
github.com
/josdejong/mathjs
package
Sources
- CVE List CVE-2026-40897
- GitHub Advisory GHSA-29qv-4j9f-fjw5
- NVD CVE-2026-40897
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.