PoC Monitor
← All CVEs
CVE-2026-40897published 24 Apr 2026 16:48 UTCData: JSON · API

Josdejong mathjs

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.

First public PoC 12 daysafter publication · 7 May 2026
Public PoCs22 on GitHub
CVSS8.8high · scored by CNA · CWE-915
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

josdejong mathjs
  • >= 13.1.1, < 15.2.0

Fixed in 15.2.0

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8+10+12+14CVE published24 Apr 2026 · t = 0First public PoC7 May 2026 · t+12d

First public PoC 12 days after publication; not in CISA KEV. First PoC: EQSTLab/CVE-2026-40897 (created 7 May 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

2 PoCs

PoCs 2
RepositoryCreatedStarsAssessment
EQSTLab/CVE-2026-40897 7 May 2026 +12 d 2 PoC
yym8538/CVE-2026-40897 21 Aug 2026 +118 d 1 PoC

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

PoC characteristics

What to hunt for in your logs · from 2 PoC repos

POST /calculate

Content-Type
application/json
Ports
3000
Seen in
2 repos: EQSTLab/CVE-2026-40897, yym8538/CVE-2026-40897
Evidence
EQSTLab/CVE-2026-40897/server.js:103 yym8538/CVE-2026-40897/server.js:103

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /calculate
(?i)^/calculate(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /calculate
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2026-40897 josdejong mathjs exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/calculate"; reference:url,poc.griffinguard.io/cve/CVE-2026-40897; classtype:web-application-attack; sid:9753944; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /calculate
title: josdejong mathjs exploit attempt (CVE-2026-40897)
id: gg-pocmon-cve-2026-40897-9753944
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40897. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-40897
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/calculate'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.40897