CVE-2026-41507

CRITICAL CVSS 3.1: 9.8 EPSS 0.39%
Updated Oct 26, 2026
Mauriciopoppe
Parameter Value
CVSS 9.8 (CRITICAL)
Affected Versions before 0.4.3
Fixed In 0.4.3
Type CWE-94 (Code Injection)
Vendor Mauriciopoppe
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
High
Complete data modification
Availability
High
Complete denial of service

CVSS Vector v3.1

Weakness Type (CWE)

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Mauriciopoppe Math-Codegen
cpe:2.3:a:mauriciopoppe:math-codegen:*:*:*:*:*:*:*:*
— 0.4.3