Cyber Resilience

CVE-2026-41139

RCE in Mathjs 13.1.0 – 15.2.0

Published
07 May 2026
Modified
15 July 2026
Patch / advisory
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0058 45th percentile
Risk Priority 64 floored blend · peak EPSS

Summary

CVE-2026-41139 is a high-severity Improperly Controlled Modification of Dynamically-Determined Object Attributes (CWE-915) vulnerability in Mathjs Mathjs. Its CVSS base score is 8.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked at the 45th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and AC-6 (Least Privilege) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.002 AppleScript Execution
Adversaries may abuse AppleScript for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
T1059.005 Visual Basic Execution
Adversaries may abuse Visual Basic (VB) for execution.
T1059.006 Python Execution
Adversaries may abuse Python commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-40897Same product: Mathjs Mathjs
CVE-2026-32640Shared CWE-915, CWE-94
CVE-2026-44495Shared CWE-915, CWE-94
CVE-2026-31251Shared CWE-915, CWE-94
CVE-2026-31252Shared CWE-915, CWE-94
CVE-2026-46517Shared CWE-915, CWE-94
CVE-2026-1340Shared CWE-94
CVE-2024-54724Shared CWE-94
CVE-2013-3906Shared CWE-94
CVE-2023-25261Shared CWE-94

Affected Assets

mathjs
mathjs
13.1.0 — 15.2.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Enforces authorizations so that only permitted attributes may be modified on an object.

Limits the set of modifiable attributes a subject is authorized to touch.

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Validates incoming attribute names and values so that only explicitly allowed fields are accepted for update.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require allow-listing of mutable object attributes and input validation to block mass-assignment flaws.

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Secure coding standards explicitly forbid unsafe dynamic attribute assignment and require property allow-lists.

finds

Security testing can detect mass-assignment flaws but does not itself prevent them at runtime.

prevents

Secure development lifecycle requires input validation and object-property whitelisting that directly mitigates mass-assignment risks.

prevents

Application security requirements include explicit rules for allowable object attributes and safe deserialization.

prevents

Secure architecture principles mandate strict control over dynamic object modification and attribute binding.

prevents

Information access restriction limits who can modify objects but does not address which attributes may be changed.

References