{"id":"CVE-2026-40897","aliases":["EUVD-2026-25571","GHSA-29qv-4j9f-fjw5"],"status":"published","title":"Math.js: Unsafe object property setter in mathjs","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.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00551,"percentile":0.46392,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-915","CWE-917"],"published":"2026-04-16T22:38:43Z","modified":"2026-10-28T02:30:56Z","exploits":[{"source":"pocgithub","id":"EQSTLab/CVE-2026-40897","title":"EQSTLab/CVE-2026-40897","date":"2026-05-07","url":"https://github.com/EQSTLab/CVE-2026-40897"},{"source":"pocgithub","id":"yym8538/CVE-2026-40897","title":"yym8538/CVE-2026-40897","date":"2026-08-21","url":"https://github.com/yym8538/CVE-2026-40897"}],"fixes":[{"ecosystem":"npm","package":"mathjs","fixed_in":["15.2.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"mathjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"13.1.1"},{"fixed":"15.2.0"}]}]},{"source":"osv","ecosystem":"npm","package":"mathjs","ranges":[{"type":"SEMVER","events":[{"introduced":"13.1.1"},{"fixed":"15.2.0"}]}]}],"products":[{"vendor":"josdejong","product":"mathjs"},{"vendor":"mathjs","product":"mathjs"},{"vendor":"red hat","product":"red hat developer hub"},{"vendor":"red hat","product":"red hat enterprise linux 10"},{"vendor":"red hat","product":"red hat enterprise linux 8"},{"vendor":"red hat","product":"red hat enterprise linux 9"},{"vendor":"red hat","product":"red hat openshift ai (rhoai)"},{"vendor":"red hat","product":"red hat openshift container platform 4"},{"vendor":"red hat","product":"self-service automation portal 2"}],"references":[{"url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/josdejong/mathjs/pull/3656","tags":["x_refsource_MISC","Issue Tracking","fix","web"]},{"url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40897","tags":["vdb-entry","x_refsource_REDHAT","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461612","tags":["issue-tracking","x_refsource_REDHAT","report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json","tags":["x_sadp-csaf-vex","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-29qv-4j9f-fjw5"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40897.json","tags":["advisory"]},{"url":"https://github.com/josdejong/mathjs","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-40897","title":"Math.js: Unsafe object property setter in mathjs","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.","status":"published","published":"2026-04-24T16:48:34.849Z","modified":"2026-07-15T01:00:27.424Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-915","CWE-917"],"updated_at":"2026-11-02T13:43:11.445168Z"}],"euvd":[{"id":"EUVD-2026-25571","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.","status":"published","published":"2026-04-24T16:48:34Z","modified":"2026-07-15T01:00:27Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T18:19:56.47701Z"}],"ghsa":[{"id":"GHSA-29qv-4j9f-fjw5","title":"Unsafe object property setter in mathjs","description":"### 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).","status":"published","published":"2026-04-16T22:38:43Z","modified":"2026-04-28T13:34:47Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-915"],"updated_at":"2026-11-02T14:39:59.776263Z"}],"nvd":[{"id":"CVE-2026-40897","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.","status":"published","published":"2026-04-24T17:16:20.783Z","modified":"2026-10-26T21:10:00.17Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-915","CWE-917"],"updated_at":"2026-11-02T14:12:15.867234Z"}],"osv":[{"id":"CVE-2026-40897","title":"Math.js: Unsafe object property setter in mathjs","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.","status":"published","published":"2026-04-24T16:48:34.849Z","modified":"2026-10-28T02:30:56.816445601Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-915"],"updated_at":"2026-11-02T15:45:03.424067Z"},{"id":"GHSA-29qv-4j9f-fjw5","title":"Unsafe object property setter in mathjs","description":"### 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).","status":"published","published":"2026-04-16T22:38:43Z","modified":"2026-09-10T03:50:42.109615433Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-915"],"updated_at":"2026-11-02T15:46:33.956911Z"}]}}
