CVE-2026-41507CRITICAL 9.8EPSS p30.9%
CVE-2026-41507CVE-2026-41507
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.
Scoring
| CVSS 3.1 | 9.8 (CRITICAL) |
| Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| EPSS | 0.39% probability of exploitation · percentile 30.9% · 2026-06-19T12:03:05Z |
| Published | 2026-05-08 |
| Last modified | 2026-05-12 |
Underlying weaknesses· 1
References
1
| Type | Target | Confidence | Tier |
|---|---|---|---|
| Weakness | Improper Control of Generation of Code ('Code Injection')cwe-94 | 0% | live |
Related by meaning· 6
Nearest entities by semantic similarity across the cs-graph corpus.