{"id":"CVE-2026-40897","aliases":["GHSA-29qv-4j9f-fjw5"],"summary":"Math.js: Unsafe object property setter in mathjs","published_at":"2026-04-16T22:38:43Z","modified_at":"2026-09-10T03:50:42.109615Z","products":[],"rating":{"severity":"high","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attack_path":"internet_authenticated","user_interaction":false,"malicious":false,"red_hat":"Important","vendor_ratings":[{"source":"Red Hat","rating":"Important"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.005909999832510948,"percentile":0.490449994802475,"date":"2026-11-19T00:00:00Z"},"priority":9.8,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"josdejong/mathjs","versions":[">= 13.1.1, < 15.2.0"],"provider":"cvelistv5","source":"CVE-2026-40897","relation":"self"},{"ecosystem":"NVD","package":"mathjs:mathjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"13.1.1"},{"fixed":"15.2.0"}]}],"fixed":["15.2.0"],"provider":"nvd","source":"CVE-2026-40897","relation":"self"},{"ecosystem":"npm","package":"mathjs","purl":"pkg:npm/mathjs","ranges":[{"type":"SEMVER","events":[{"introduced":"13.1.1"},{"fixed":"15.2.0"}]}],"fixed":["15.2.0"],"provider":"osv","source":"GHSA-29qv-4j9f-fjw5","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Developer Hub 1","cpe":"cpe:/a:redhat:rhdh:1","status":"not_affected","packages":["rhdh/rhdh-hub-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","cpe":"cpe:/a:redhat:enterprise_linux:10","status":"not_affected","packages":["qt6-qtbase"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","cpe":"cpe:/a:redhat:enterprise_linux:8","status":"not_affected","packages":["qt5-qtbase","qt5-qtbase-common","qt5-qtbase-devel","qt5-qtbase-examples","qt5-qtbase-gui","qt5-qtbase-mysql","qt5-qtbase-odbc","qt5-qtbase-postgresql","qt5-qtbase-private-devel","qt5-qtbase-static"],"package_count":10,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","cpe":"cpe:/a:redhat:enterprise_linux:9","status":"not_affected","packages":["qt5-qtbase","qt5-qtbase-common","qt5-qtbase-devel","qt5-qtbase-examples","qt5-qtbase-gui","qt5-qtbase-mysql","qt5-qtbase-odbc","qt5-qtbase-postgresql","qt5-qtbase-private-devel","qt5-qtbase-static"],"package_count":10,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"not_affected","packages":["rhoai/odh-dashboard-rhel9","rhoai/odh-mod-arch-gen-ai-rhel9","rhoai/odh-mod-arch-maas-rhel9","rhoai/odh-mod-arch-model-registry-rhel9"],"package_count":4,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"not_affected","packages":["openshift4/ose-monitoring-plugin-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Self-service automation portal 2","cpe":"cpe:/a:redhat:ansible_portal:2","status":"not_affected","packages":["ansible-automation-platform/automation-portal"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2026-40897","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2026-40897","license":"CC-BY-4.0","published_at":"2026-04-24T16:48:34.849Z","modified_at":"2026-07-15T01:00:27.424Z","summary":"Math.js: Unsafe object property setter in mathjs","details":"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":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2026-40897"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"redhat-SADP:CVE-2026-40897"}],"affected":[{"ecosystem":"CVE","package":"josdejong/mathjs","versions":[">= 13.1.1, < 15.2.0"],"provider":"cvelistv5","source":"CVE-2026-40897","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/pull/3656"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad"}]},{"provider":"nvd","source_id":"CVE-2026-40897","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897","severity":[],"affected":[{"ecosystem":"NVD","package":"mathjs:mathjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"13.1.1"},{"fixed":"15.2.0"}]}],"fixed":["15.2.0"],"provider":"nvd","source":"CVE-2026-40897","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-29qv-4j9f-fjw5","relation":"self","url":"https://osv.dev/vulnerability/GHSA-29qv-4j9f-fjw5","license":"CC-BY-4.0","published_at":"2026-04-16T22:38:43Z","modified_at":"2026-09-10T03:50:42.109615Z","summary":"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).","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"GHSA-29qv-4j9f-fjw5"}],"affected":[{"ecosystem":"npm","package":"mathjs","purl":"pkg:npm/mathjs","ranges":[{"type":"SEMVER","events":[{"introduced":"13.1.1"},{"fixed":"15.2.0"}]}],"fixed":["15.2.0"],"provider":"osv","source":"GHSA-29qv-4j9f-fjw5","relation":"self"}],"product_status":[],"references":[{"type":"WEB","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":"WEB","url":"https://github.com/josdejong/mathjs/pull/3656"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad"},{"type":"PACKAGE","url":"https://github.com/josdejong/mathjs"}]},{"provider":"redhat-vex","source_id":"CVE-2026-40897","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2026-40897","license":"CC-BY-4.0","published_at":"2026-04-24T16:48:34.849Z","modified_at":"2026-05-04T14:38:08.692612Z","summary":"mathjs: Math.js: Arbitrary code execution via expression parser","details":"A flaw was found in mathjs, an extensive math library for JavaScript and Node.js. This vulnerability allows a remote attacker to execute arbitrary JavaScript code by evaluating malicious expressions through the mathjs expression parser. This can lead to a complete compromise of the affected application.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2026-40897"},{"type":"Red Hat","score":"Important","source":"CVE-2026-40897"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Developer Hub 1","cpe":"cpe:/a:redhat:rhdh:1","status":"not_affected","packages":["rhdh/rhdh-hub-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","cpe":"cpe:/a:redhat:enterprise_linux:10","status":"not_affected","packages":["qt6-qtbase"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","cpe":"cpe:/a:redhat:enterprise_linux:8","status":"not_affected","packages":["qt5-qtbase","qt5-qtbase-common","qt5-qtbase-devel","qt5-qtbase-examples","qt5-qtbase-gui","qt5-qtbase-mysql","qt5-qtbase-odbc","qt5-qtbase-postgresql","qt5-qtbase-private-devel","qt5-qtbase-static"],"package_count":10,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","cpe":"cpe:/a:redhat:enterprise_linux:9","status":"not_affected","packages":["qt5-qtbase","qt5-qtbase-common","qt5-qtbase-devel","qt5-qtbase-examples","qt5-qtbase-gui","qt5-qtbase-mysql","qt5-qtbase-odbc","qt5-qtbase-postgresql","qt5-qtbase-private-devel","qt5-qtbase-static"],"package_count":10,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"not_affected","packages":["rhoai/odh-dashboard-rhel9","rhoai/odh-mod-arch-gen-ai-rhel9","rhoai/odh-mod-arch-maas-rhel9","rhoai/odh-mod-arch-model-registry-rhel9"],"package_count":4,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"not_affected","packages":["openshift4/ose-monitoring-plugin-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"},{"vendor":"Red Hat","product":"Self-service automation portal 2","cpe":"cpe:/a:redhat:ansible_portal:2","status":"not_affected","packages":["ansible-automation-platform/automation-portal"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-40897"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-40897"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461612"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-40897"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/pull/3656"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5"}]}],"references":[{"type":"WEB","url":"https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/pull/3656"},{"type":"WEB","url":"https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897"},{"type":"PACKAGE","url":"https://github.com/josdejong/mathjs"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-40897"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461612"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-40897"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2026-40897","url":"https://www.cve.org/CVERecord?id=CVE-2026-40897","license":"CC-BY-4.0","modified_at":"2026-07-15T01:00:27.424Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2026-40897","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40897","relation":"self"},{"provider":"osv","source_id":"GHSA-29qv-4j9f-fjw5","url":"https://osv.dev/vulnerability/GHSA-29qv-4j9f-fjw5","license":"CC-BY-4.0","modified_at":"2026-09-10T03:50:42.109615Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2026-40897","url":"https://access.redhat.com/security/cve/CVE-2026-40897","license":"CC-BY-4.0","modified_at":"2026-05-04T14:38:08.692612Z","relation":"self"}]}
