Skip to main content

Math.js CVE-2026-41139

| EUVDEUVD-2026-28310 HIGH
Improperly Controlled Modification of Dynamically-Determined Object Attributes (CWE-915)
2026-05-07 GitHub_M GHSA-jvff-x2qm-6286
8.8
CVSS 3.1 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat
8.8 HIGH
qualitative

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
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Source Code Evidence Fetched
May 07, 2026 - 05:46 vuln.today
Analysis Generated
May 07, 2026 - 05:46 vuln.today
CVE Published
May 07, 2026 - 05:06 nvd
HIGH 8.8

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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).

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

CVE-2015-5688 MEDIUM POC
5.0 Sep 04

Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read

CVE-2026-45321 CRITICAL POC
9.6 May 12

Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio

CVE-2014-7192 CRITICAL POC
10.0 Dec 11

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

CVE-2013-4450 MEDIUM POC
5.0 Oct 21

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

Vendor StatusVendor

Share

CVE-2026-41139 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy