Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. mathjs
  4. ›
  5. CVE-2026-40897

CVE-2026-40897: Unsafe object property setter in mathjs

April 16, 2026 (updated April 27, 2026)

This security 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.

References

  • github.com/advisories/GHSA-29qv-4j9f-fjw5
  • github.com/josdejong/mathjs
  • github.com/josdejong/mathjs/commit/513ab2a0e01004af91b31aada68fae8a821326ad
  • github.com/josdejong/mathjs/pull/3656
  • github.com/josdejong/mathjs/security/advisories/GHSA-29qv-4j9f-fjw5
  • nvd.nist.gov/vuln/detail/CVE-2026-40897

Code Behaviors & Features

Detect and mitigate CVE-2026-40897 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 13.1.1 before 15.2.0

Fixed versions

  • 15.2.0

Solution

Upgrade to version 15.2.0 or above.

Impact 8.8 HIGH

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

Learn more about CVSS

Weakness

  • CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes

Source file

npm/mathjs/CVE-2026-40897.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:22 +0000.