Read the docs
TI-2026-30092 Aliases CVE-2026-41507GHSA-p6x5-p4xf-cc4r

Remote Code Execution (RCE) via String Literal Injection into math-codegen

Priority MEDIUM 49CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00393 33rd percentileScored 2026-11-07
Fix Fixed math-codegen (mauriciopoppe): 0.4.3math-codegen (npm): 0.4.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
mauriciopoppemath-codegenbefore 0.4.30.4.3Patch availableCNA
—math-codegen (npm)before 0.4.30.4.3Patch availableGHSA-p6x5-p4xf-cc4r
  • math-codegen Vendormauriciopoppe Affected before 0.4.3 Fixed in 0.4.3 Patch available CNA
  • math-codegen (npm) Vendor— Affected before 0.4.3 Fixed in 0.4.3 Patch available GHSA-p6x5-p4xf-cc4r

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:mauriciopoppe:math-codegen:*:*:*:*:*:*:*:*before 0.4.3Vulnerablemauriciopoppe
  • cpe:2.3:a:mauriciopoppe:math-codegen:*:*:*:*:*:*:*:* Versions before 0.4.3 Vulnerable ·mauriciopoppe

Remediation

  • Fix · CNA math-codegen (mauriciopoppe) Fixed in 0.4.3
  • Fix · GHSA-p6x5-p4xf-cc4r math-codegen (npm) Fixed in 0.4.3 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-41507
  2. 2026-10-03 Alias added: GHSA-p6x5-p4xf-cc4r
  3. 2026-10-25 EPSS moved to the below the 50th percentile

References

Sources