CVE-2026-40897: CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes in josdejong mathjs
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.
AI Analysis
Technical Summary
CVE-2026-40897 is a high-severity vulnerability in the josdejong mathjs library affecting versions >=13.1.1 and <15.2.0. It involves improper control of dynamically-determined object attributes (CWE-915), allowing an attacker to execute arbitrary JavaScript code through the expression parser. This vulnerability is relevant in applications that evaluate user-supplied expressions using mathjs. The vulnerability is fixed in version 15.2.0. The CVSS 3.1 score is 8.8, indicating high impact on confidentiality, integrity, and availability.
Potential Impact
Successful exploitation allows an attacker with at least low privileges and no user interaction to execute arbitrary JavaScript code remotely, potentially leading to full compromise of the affected application environment. The impact includes complete loss of confidentiality, integrity, and availability of the system running the vulnerable mathjs versions.
Mitigation Recommendations
Upgrade mathjs to version 15.2.0 or later to remediate this vulnerability. Patch status is confirmed by the vendor advisory. No alternative mitigations are indicated in the advisory.
CVE-2026-40897: CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes in josdejong 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.
CVSS v3.1
Score 8.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-40897 is a high-severity vulnerability in the josdejong mathjs library affecting versions >=13.1.1 and <15.2.0. It involves improper control of dynamically-determined object attributes (CWE-915), allowing an attacker to execute arbitrary JavaScript code through the expression parser. This vulnerability is relevant in applications that evaluate user-supplied expressions using mathjs. The vulnerability is fixed in version 15.2.0. The CVSS 3.1 score is 8.8, indicating high impact on confidentiality, integrity, and availability.
Potential Impact
Successful exploitation allows an attacker with at least low privileges and no user interaction to execute arbitrary JavaScript code remotely, potentially leading to full compromise of the affected application environment. The impact includes complete loss of confidentiality, integrity, and availability of the system running the vulnerable mathjs versions.
Mitigation Recommendations
Upgrade mathjs to version 15.2.0 or later to remediate this vulnerability. Patch status is confirmed by the vendor advisory. No alternative mitigations are indicated in the advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-15T16:37:22.766Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-40897","vendor":"Red Hat"}]
Threat ID: 69eba2fd87115cfb68542cd0
Added to database: 04/24/2026, 17:06:05 UTC
Last enriched: 07/15/2026, 09:12:26 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 133
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.