Skip to main content
VulnerabilityPublished

CVE-2026-41507: mauriciopoppe math-codegen · Code Injection

Affects mauriciopoppe math-codegenSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 9.8 Critical : upgrade to 0.4.3 as a priority.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 33% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 0.4.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 8 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade math-codegen and mauriciopoppe/math-codegen to 0.4.3.

Affected software

ProductAffectedFixed in
mauriciopoppemath-codegenAffected
  • <0.4.3
Fixed in
  • 0.4.3
npmmauriciopoppe/math-codegenpkg:npm/mauriciopoppe/math-codegenOther threatsAffected
  • <0.4.3
Fixed in
  • 0.4.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade to mauriciopoppe math-codegen version 0.4.3 or later, where this vulnerability has been patched. Applications using affected versions should immediately update to the fixed version to prevent exploitation. Patch status is not explicitly stated in a vendor advisory, but the description confirms the issue is fixed in version 0.4.3.

Description

math-codegen generates code from mathematical expressions. Prior to version 0.4.3, string literal content passed to cg.parse() is injected verbatim into a new Function() body without sanitization. This allows an attacker to execute arbitrary system commands when user-controlled input reaches the parser. Any application exposing a math evaluation endpoint where user input flows into cg.parse() is vulnerable to full RCE. This issue has been patched in version 0.4.3.

References

Community reviews

Loading reviews…