{"id":"CVE-2026-40897","published":"2026-04-24T16:48:34Z","modified":"2026-07-15T01:00:27Z","title":"Math.js: Unsafe object property setter in mathjs","vendor":"josdejong","product":"mathjs","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00849,"percentile":0.55555,"provenance":"source"},"cwes":[{"id":"CWE-915","name":"Improperly Controlled Modification of Dynamically-Determined Object Attributes"},{"id":"CWE-917","name":"Improper Neutralization of Special Elements used in an Expression Language Statement"}],"references":[{"url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/josdejong/mathjs/pull/3656","tags":["x_refsource_MISC"]},{"url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40897","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461612","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json","tags":["x_sadp-csaf-vex"]}],"priority":{"score":22.3,"factors":[{"name":"EPSS percentile","points":11.11},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.16}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2026-05-07","earliestUrl":"https://github.com/EQSTLab/CVE-2026-40897","repos":[{"name":"EQSTLab/CVE-2026-40897","url":"https://github.com/EQSTLab/CVE-2026-40897","stars":3,"created":"2026-05-07"},{"name":"yym8538/CVE-2026-40897","url":"https://github.com/yym8538/CVE-2026-40897","stars":1,"created":"2026-08-21"}]},"first":{"date":"2026-05-07","source":"PoC-in-GitHub","url":"https://github.com/EQSTLab/CVE-2026-40897"},"provenance":"source"},"vendorSlug":"josdejong","affectedVersions":[{"vendor":"josdejong","product":"mathjs","versions":[">= 13.1.1, < 15.2.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-04-24T17:44:50.632032Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"mathjs","vulnerableRanges":[">=13.1.1, <15.2.0"],"patched":["15.2.0"],"from":["GHSA-29qv-4j9f-fjw5"],"provenance":"source"}],"summary":{"text":"Math.js, an extensive math library for JavaScript and Node.js, contains an unsafe object property setter in its expression parser, affecting versions from 13.1.1 up to but not including 15.2.0. An attacker who has low-privileged access and can get an application to evaluate attacker-supplied expressions through the mathjs parser can execute arbitrary JavaScript, with high impact to confidentiality, integrity and availability, and no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:14Z"},"euvd":{"id":"EUVD-2026-25571","exploited":false,"provenance":"source"}}