CVE-2026-40897

Math.js: Unsafe object property setter in mathjs

HIGH
8.8
CVSS Score
Published: April 24, 2026 at 04:48 PM UTC
Updated: July 15, 2026 at 02:21 AM UTC
2 products affected across 2 vendorsMathjsMathjs

Using mathjs by josdejong?

Get instant alerts when new vulnerabilities affect mathjs - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 0.6%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

13.1.1 ≤ v < 15.2.0
Affected range stops below 15.2.0, so it looks safe — our inference, not a vendor statement
v < 15.2.0
Affected range stops below 15.2.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (6)

x_refsource_CONFIRMVendor Advisory
Source: cverecord
https://github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5
x_refsource_MISCIssue Tracking
Source: cverecord
https://github.com/josdejong/mathjs/pull/3656
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/security/cve/CVE-2026-40897
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://bugzilla.redhat.com/show_bug.cgi?id=2461612

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

8.8HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-915CWE-917

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card