Math.js: Unsafe object property setter in mathjs
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Tampering
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-915.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| josdejong | mathjs | 13.1.1 to before 15.2.0 | 15.2.0 | Patch available | CNA |
| — | mathjs (npm) | 13.1.1 to before 15.2.0 | 15.2.0 | Patch available | GHSA-29qv-4j9f-fjw5 |
- mathjs Vendorjosdejong Affected 13.1.1 to before 15.2.0 Fixed in 15.2.0 Patch available CNA
- mathjs (npm) Vendor— Affected 13.1.1 to before 15.2.0 Fixed in 15.2.0 Patch available GHSA-29qv-4j9f-fjw5
Remediation
- Fix · CNA mathjs (josdejong) Fixed in 15.2.0
- Fix · GHSA-29qv-4j9f-fjw5 mathjs (npm) Fixed in 15.2.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 7 products
- Red Hat Developer Hub 1
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift Container Platform 4
- Self-service automation portal 2
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40897
- 2026-10-03 Alias added: GHSA-29qv-4j9f-fjw5
- 2026-10-25 EPSS moved to the below the 50th percentile
- 2026-10-27 Affected versions changed · Red Hat
References
Advisory 2
More math.js Mathjs vulnerabilities
- TI-2026-29767 Unsafe array index getter in mathjs CVSS 3.0HIGH 8.8
- TI-2020-06261 Prototype pollution in mathjs CVSS 3.1HIGH 7.3
Sources
- CVE-2026-40897 · CVE Program
- CVE-2026-40897 · NVD
- FIRST EPSS
- GHSA-29qv-4j9f-fjw5 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-40897 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences