{"id":"CVE-2026-40897","aliases":["CVE-2026-40897","GHSA-29qv-4j9f-fjw5"],"related":[],"kind":"vulnerability","state":"published","title":"Math.js: Unsafe object property setter in mathjs","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThis security 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.\n\n### Patches\nThe issue was introduced in mathjs `v13.1.1`, and patched in mathjs `v15.2.0`.\n\n### Workarounds\nThere is no workaround without upgrading to `v15.2.0`.\n\n### References\nYou can find out more via the commit fixing this issue: https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad (part of PR https://github.com/josdejong/mathjs/pull/3656).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Math.js es una extensa biblioteca matemática para JavaScript y Node.js. Desde la 13.1.1 hasta antes de la 15.2.0, una vulnerabilidad permitía ejecutar JavaScript arbitrario a través del analizador de expresiones de mathjs. Puede verse afectado si tiene una aplicación donde los usuarios pueden evaluar expresiones arbitrarias utilizando el analizador de expresiones de mathjs. Esta vulnerabilidad está corregida en la 15.2.0.","source":"nvd"}],"published":"2026-04-16T22:38:43.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-915","CWE-917"],"affected":[{"ranges":[{"version":">= 13.1.1, < 15.2.0","status":"affected"}],"vendor":"josdejong","product":"mathjs","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Developer Hub","package":"rhdh/rhdh-hub-rhel9","cpe":"cpe:/a:redhat:rhdh:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"qt6-qtbase","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"qt5-qtbase","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"qt5-qtbase","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-dashboard-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-mod-arch-gen-ai-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-mod-arch-maas-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-mod-arch-model-registry-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift4/ose-monitoring-plugin-rhel9","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Self-service automation portal 2","package":"ansible-automation-platform/automation-portal","cpe":"cpe:/a:redhat:ansible_portal:2","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"13.1.1","status":"affected","fixed":"15.2.0"}],"ecosystem":"npm","package":"mathjs","purl":"pkg:npm/mathjs","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"13.1.1","fixed":"15.2.0"}],"vendor":"mathjs","product":"mathjs","cpe":"cpe:2.3:a:mathjs:mathjs:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/josdejong/mathjs/pull/3656","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40897","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461612","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/josdejong/mathjs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-04-24T17:44:50.632Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40897","url":"https://www.cve.org/CVERecord?id=CVE-2026-40897","licence":"CVE Terms of Use","modified":"2026-07-15T01:00:27.424Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-29qv-4j9f-fjw5","url":"https://github.com/advisories/GHSA-29qv-4j9f-fjw5","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:42.109Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40897","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:19.547Z","epss":{"score":0.006,"percentile":0.5009,"date":"2026-12-01T12:00:22.000Z"}}