LiveActive security incident?Get immediate response
CVE Record

CVE-2026-40897: Math.js: Unsafe object property setter in 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.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Math.js can be embedded in web or Node.js applications. If an application lets users submit expressions to the mathjs expression parser, vulnerable versions may allow JavaScript execution with the application's privileges. The business risk is data exposure, data tampering, and service disruption where expression evaluation is exposed.

Executive priority

Treat as high priority if mathjs expression evaluation is exposed to users. Patch quickly for internet-facing or multi-user systems; lower urgency if mathjs is unused or only processes trusted internal expressions.

Technical view

CVE-2026-40897 affects mathjs versions 13.1.1 through before 15.2.0. The sources describe an unsafe object property setter in the expression parser allowing arbitrary JavaScript execution. The CVSS 3.1 score is 8.8, with network attack vector, low complexity, low privileges, and high confidentiality, integrity, and availability impact.

Likely exposure

Exposure is likely in applications that depend on mathjs 13.1.1 to before 15.2.0 and allow users to evaluate arbitrary mathjs expressions.

Exploitation context

The provided sources do not show CISA KEV listing or confirmed active exploitation. Practical risk depends on whether untrusted users can reach the mathjs expression parser.

Researcher notes

The evidence identifies affected versions, fixed version 15.2.0, CWE-915 and CWE-917, and references a GitHub advisory, PR, and commit. The bundle does not provide safe reproduction details or proof of exploitation in the wild.

Mitigation direction

  • Upgrade mathjs to version 15.2.0 or later.
  • Temporarily disable untrusted expression evaluation until upgraded.
  • Restrict parser access to trusted users and trusted inputs.
  • Check vendor or distribution advisories for backported fixes.
  • Review exposed services using mathjs for suspicious expression-evaluation activity.

Validation and detection

  • Inspect package manifests, lockfiles, and SBOMs for affected mathjs versions.
  • Identify routes, APIs, or jobs that pass user input to the expression parser.
  • Confirm deployed artifacts use mathjs 15.2.0 or a vendor-fixed build.
  • Run dependency scanning across applications, containers, and serverless packages.
  • Add regression tests covering parser input boundaries without offensive payloads.
Prepared
Confidence
high
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-915: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-917: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-40897 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
2ADP providers
7Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9GitHub_M
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9redhat-SADP

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2026-40897Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
redhat-SADPmathjs: Math.js: Arbitrary code execution via expression parser
other:Red Hat severity ratingcvssV3_1
  • 2026-04-24T18:01:41.982Z: Reported to Red Hat.
  • 2026-04-24T16:48:34.849Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
josdejongmathjs>= 13.1.1, < 15.2.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-915 · source CWE mapping

Improperly Controlled Modification of Dynamically-Determined Object Attributes

Improperly Controlled Modification of Dynamically-Determined Object Attributes represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-917 · source CWE mapping

Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')

Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.