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
The mathjs JavaScript library versions >=13.1.1 and <15.2.0 contain a vulnerability classified as CWE-915, involving improper control over modification of dynamically-determined object attributes. This allows an attacker to execute arbitrary JavaScript code through the expression parser if user input is evaluated without restriction. The vulnerability is resolved in version 15.2.0 of mathjs.
Potential Impact
Successful exploitation can lead to remote code execution with high confidentiality, integrity, and availability impacts, as indicated by the CVSS 3.1 score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). This means an attacker with limited privileges but no user interaction can execute arbitrary code remotely, potentially compromising the affected system fully.
Mitigation Recommendations
Upgrade mathjs to version 15.2.0 or later, where this vulnerability is fixed. Until the upgrade is applied, avoid evaluating untrusted user input with the mathjs expression parser to prevent exploitation. Patch status is confirmed by the vendor fix in version 15.2.0.
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The mathjs JavaScript library versions >=13.1.1 and <15.2.0 contain a vulnerability classified as CWE-915, involving improper control over modification of dynamically-determined object attributes. This allows an attacker to execute arbitrary JavaScript code through the expression parser if user input is evaluated without restriction. The vulnerability is resolved in version 15.2.0 of mathjs.
Potential Impact
Successful exploitation can lead to remote code execution with high confidentiality, integrity, and availability impacts, as indicated by the CVSS 3.1 score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). This means an attacker with limited privileges but no user interaction can execute arbitrary code remotely, potentially compromising the affected system fully.
Mitigation Recommendations
Upgrade mathjs to version 15.2.0 or later, where this vulnerability is fixed. Until the upgrade is applied, avoid evaluating untrusted user input with the mathjs expression parser to prevent exploitation. Patch status is confirmed by the vendor fix in version 15.2.0.
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
Threat ID: 69eba2fd87115cfb68542cd0
Added to database: 4/24/2026, 5:06:05 PM
Last enriched: 4/24/2026, 5:21:07 PM
Last updated: 4/24/2026, 8:26:25 PM
Views: 7
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.