# CVE-2026-40897: Math.js: Unsafe object property setter in mathjs

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.60%, higher than 50% of CVEs (2026-12-01)
- Published: 2026-04-16T22:38:43.000Z
- Modified: 2026-10-26T21:10:00.170Z
- Also known as: GHSA-29qv-4j9f-fjw5
- Weaknesses: CWE-915, CWE-917
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- josdejong mathjs: >= 13.1.1, < 15.2.0
- rhdh/rhdh-hub-rhel9: no versions given
- qt6-qtbase: no versions given
- qt5-qtbase: no versions given
- rhoai/odh-dashboard-rhel9: no versions given
- rhoai/odh-mod-arch-gen-ai-rhel9: no versions given
- rhoai/odh-mod-arch-maas-rhel9: no versions given
- rhoai/odh-mod-arch-model-registry-rhel9: no versions given
- openshift4/ose-monitoring-plugin-rhel9: no versions given
- ansible-automation-platform/automation-portal: no versions given
- mathjs (npm): from 13.1.1 before 15.2.0
- mathjs mathjs: from 13.1.1 before 15.2.0

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- redhat-SADP: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5> (vendor-advisory, web)
- <https://github.com/josdejong/mathjs/pull/3656> (issue-tracking, web)
- <https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad> (patch, web)
- <https://access.redhat.com/security/cve/CVE-2026-40897> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2461612> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40897> (advisory)
- <https://github.com/josdejong/mathjs> (package)

## Sources

- CVE List: [CVE-2026-40897](https://www.cve.org/CVERecord?id=CVE-2026-40897), CVE Terms of Use, modified 2026-07-15
- GitHub Advisory Database: [GHSA-29qv-4j9f-fjw5](https://github.com/advisories/GHSA-29qv-4j9f-fjw5), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-40897](https://nvd.nist.gov/vuln/detail/CVE-2026-40897), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40897 · Whole record: https://cve.day/CVE-2026-40897.json · Rebuilt by cve.day 2026-11-25T22:59:19.547Z
