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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| josdejong | mathjs | >= 13.1.1, < 15.2.0 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
EQSTLab/CVE-2026-40897 ★ 2 · May 7, 2026
Math.js Expression Parser RCE
-
yym8538/CVE-2026-40897 ★ 1 · Aug 21, 2026
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | mathjs | >= 13.1.1, < 15.2.0 | 15.2.0 | GHSA-29qv-4j9f-fjw5 |