CVE-2026-40897
CVE-2026-40897 is a high-severity vulnerability in Mathjs with a CVSS 3.x base score of 8.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-915.
Key facts
- Severity: High (CVSS 3.x base score 8.8)
- EPSS exploit prediction: 1% (42nd percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-25571
- Weakness: CWE-915
- Affected product: Mathjs
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2026-40897?
- 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.
- How severe is CVE-2026-40897?
- CVE-2026-40897 has a CVSS 3.x base score of 8.8, rated high severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2026-40897 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (42nd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-40897?
- CVE-2026-40897 affects Mathjs. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-40897?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2026-40897 have an EU (EUVD) identifier?
- Yes. CVE-2026-40897 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-25571.
- When was CVE-2026-40897 published?
- CVE-2026-40897 was published on 2026-04-24 and last updated on 2026-06-30.
References
- https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad
- https://github.com/josdejong/mathjs/pull/3656
- https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5
- https://access.redhat.com/security/cve/CVE-2026-40897
- https://bugzilla.redhat.com/show_bug.cgi?id=2461612
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json
Affected products (1)
- cpe:2.3:a:mathjs:mathjs:*:*:*:*:*:node.js:*:*
More vulnerabilities in Mathjs
- CVE-2026-41139 — High (CVSS 8.8): Math.js is an extensive math library for JavaScript and Node.js. From version 13.1.0 to before version 15.2.0,…
- CVE-2020-7743 — High (CVSS 7.3): The package mathjs before 7.5.1 are vulnerable to Prototype Pollution via the deepExtend function that runs upon…
Other CWE-915 vulnerabilities
- CVE-2026-50160 — Critical (CVSS 10.0): Hoppscotch is an API development ecosystem. In self-hosted deployments of hoppscotch-backend from version 2026.4.1 and…
- CVE-2026-33453 — Critical (CVSS 10.0): Improperly Controlled Modification of Dynamically-Determined Object Attributes vulnerability in Apache Camel Camel-Coap…
- CVE-2025-58367 — Critical (CVSS 10.0): DeepDiff is a project focused on Deep Difference and search of any Python data. Versions 5.0.0 through 8.6.0 are…
- CVE-2026-56142 — Critical (CVSS 9.9): In JetBrains Hub before 2026.1.13757, 2025.3.148033, 2025.2.148048, 2025.1.148120, 2024.3.148430, 2024.2.148429…
- CVE-2025-2304 — Critical (CVSS 9.4): A Privilege Escalation through a Mass Assignment exists in Camaleon CMS When a user wishes to change his password, the…
- CVE-2025-24370 — Critical (CVSS 9.3): Django-Unicorn adds modern reactive component functionality to Django templates. Affected versions of Django-Unicorn…