{"id":"CVE-2026-40897","aliases":["GHSA-29qv-4j9f-fjw5"],"url":"https://o3.security/vulnerability/CVE-2026-40897","summary":"Math.js: Unsafe object property setter in mathjs","details":"### 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).","published":"2026-04-24T16:48:34.849Z","modified":"2026-08-12T03:51:23.368867497Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},"epss":{"score":0.00551,"percentile":0.42963,"asOf":"2026-08-05"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"mathjs","fixedVersion":"15.2.0"}],"fix":{"url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad","label":"josdejong/mathjs@513ab2a"},"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-40897"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40897.json"},{"type":"ADVISORY","url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461612"},{"type":"FIX","url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad"},{"type":"FIX","url":"https://github.com/josdejong/mathjs/pull/3656"},{"type":"PACKAGE","url":"https://github.com/josdejong/mathjs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:23.368867497Z"}}