CVE-2026-40897
published high CVSS 3.1 · 8.8Math.js: Unsafe object property setter in mathjs
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| josdejong | — | mathjs>= 13.1.1, < 15.2.0 | Affected | Not stated | GitHub_M |
| Red Hat | — | rhdh/rhdh-hub-rhel9Red Hat Developer Hub | Unaffected | Not required | redhat-SADP |
| Red Hat Enterprise Linux | 10 | qt6-qtbase | Unaffected | Not required | redhat-SADP |
| Red Hat Enterprise Linux | 8, 9 | qt5-qtbase | Unaffected | Not required | redhat-SADP |
| Red Hat | — | rhoai/odh-dashboard-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
| Red Hat | — | rhoai/odh-mod-arch-gen-ai-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
| Red Hat | — | rhoai/odh-mod-arch-maas-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
| Red Hat | — | rhoai/odh-mod-arch-model-registry-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
Show 2 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Red Hat | — | openshift4/ose-monitoring-plugin-rhel9Red Hat OpenShift Container Platform 4 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | ansible-automation-platform/automation-portalSelf-service automation portal 2 | Unaffected | Not required | redhat-SADP |
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.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| josdejong | mathjs | >= 13.1.1, < 15.2.0 (affected) | GitHub_M · cna |
| Red Hat | Red Hat Developer Hub | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Enterprise Linux 10 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Enterprise Linux 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Enterprise Linux 9 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift Container Platform 4 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Self-service automation portal 2 | Default: unaffected | redhat-SADP · adp |
Weaknesses
2- CWE-915 CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
References
6- https://access.redhat.com/security/cve/CVE-2026-40897
- RHBZ#2461612 https://bugzilla.redhat.com/show_bug.cgi?id=2461612
- https://github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad
- https://github.com/josdejong/mathjs/pull/3656
- https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40897.json
Provider assertions
3GitHub_M · cna
Math.js: Unsafe object property setter in mathjs
redhat-SADP · adp
mathjs: Math.js: Arbitrary code execution via expression parser
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 0c9b604c09e38ec5f6558b1bf256205278c1606fb9a097087d088b2192322440
- Ingested
- 23 Sep 2026, 09:13:21 UTC
- Source record
- Official CVE record