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 products
mathjs: mathjs
References6
- github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-… Vendor Advisory
- github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68f… Patch
- github.com/josdejong/mathjs/pull/3656 Issue Tracking
- access.redhat.com/security/cve/CVE-2026-40897
- bugzilla.redhat.com/show_bug.cgi?id=2461612
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897…
Metrics
- CVSS 3.1
-
8.8
HIGH
Score source: CNA
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - EPSS — exploit probability
- 1% percentile: 47 · as of 13 November 2026
- CWE
- CWE-915CWE-917
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.