Live threats

All CVEs / Mauriciopoppe

CVE-2026-41507Mauriciopoppe Math-codegen

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
—
Auth required
No
Published
May 8, 2026
Updated
Oct 26, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Math-codegen.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm math-codegen < 0.4.3 0.4.3 npm install math-codegen@0.4.3

Per OSV / GitHub Advisories (GHSA-p6x5-p4xf-cc4r). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
mauriciopoppemath-codegen< 0.4.3

Official sources

References

Links published by the sources. Open them with care.