Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3Blast Radius
ecosystem impact- 21 npm packages depend on mathjs (2 direct, 19 indirect)
Ecosystem-wide dependent count for version 13.1.0.
DescriptionCVE.org
Math.js is an extensive math library for JavaScript and Node.js. From version 13.1.0 to before version 15.2.0, arbitrary JavaScript can be executed via the expression parser of mathjs. This issue has been patched in version 15.2.0.
AnalysisAI
Remote code execution in Math.js expression parser allows authenticated attackers to execute arbitrary JavaScript code in versions 13.1.0 through 15.1.x. The vulnerability stems from unsafe property access controls (CWE-915) that can be exploited via crafted mathematical expressions. Patched in version 15.2.0 with comprehensive property access validation (commit bcf0da4, PR #3656). No active exploitation confirmed by CISA KEV, but public patch code reveals exploitable attack surface involving prototype pollution or unsafe property traversal. CVSS 8.8 with network vector and low complexity indicates high real-world risk for applications exposing Math.js parsing to user input.
Technical ContextAI
Math.js is a widely-used JavaScript mathematical expression parser and computation library for Node.js and browser environments (cpe:2.3:a:josdejong:mathjs). The vulnerability maps to CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes), commonly known as prototype pollution or unsafe property access. The GitHub PR diff reveals the root cause: insufficient validation in property access functions (getSafeProperty, setSafeProperty, isSafeProperty in src/utils/customs.js) allowed attackers to access or modify dangerous properties like __proto__, constructor, or prototype on Objects and Arrays. The fix introduces strict separation between isSafeObjectProperty (blocks inheritance from Object.prototype) and isSafeArrayProperty (restricts to numeric indices and 'length'), plus explicit type checking to prevent non-array index manipulation. Additional hardening in src/utils/array.js validates array indices. This class of vulnerability is critical in expression parsers that evaluate user-controlled input, as it can bypass sandboxing to achieve arbitrary code execution through JavaScript's prototype chain.
RemediationAI
Upgrade Math.js to version 15.2.0 or later immediately (https://github.com/josdejong/mathjs/releases/tag/v15.2.0). Apply via npm/yarn: 'npm install mathjs@15.2.0' or 'yarn upgrade mathjs@15.2.0'. The fix is implemented in commits bcf0da46f0b8577ec03c9ecd7bff8b5c2543a611 and 0aee2f61866e35ffa0aef915221cdf6b026ffdd4 (PR #3656 at https://github.com/josdejong/mathjs/pull/3656). If upgrade is not immediately feasible, implement strict input validation to reject expressions containing '__proto__', 'constructor', 'prototype', or bracket notation property access before passing to Math.js parser. Deploy this as a temporary workaround layer - note that blocklists are fragile and may be bypassed via encoding or parser quirks, so upgrade remains mandatory. For applications where Math.js is only used for trusted internal calculations (no user input), risk is lower but upgrade still recommended as defense-in-depth. Review application logs for anomalous mathematical expressions that may indicate exploitation attempts (e.g., expressions containing prototype chain keywords or unexpected property access patterns).
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read
Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio
Eval injection vulnerability in index.js in the syntax-error package before 1.1.1 for Node.js 0.10.x, as used in IBM Rat
The HTTP server in Node.js 0.10.x before 0.10.21 and 0.8.x before 0.8.26 allows remote attackers to cause a denial of se
Same technique Information Disclosure
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-28310
GHSA-jvff-x2qm-6286