CVE-2026-41507: math-codegen generates code from mathematical expressions
CVE-2026-41507 is a critical-severity flaw (CVSS 9.8) affecting math-codegen. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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
Why this priority
- Critical severity
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 0.4% (top 67%) |
| CISA exploited list | No |
| Weakness | CWE-94 |
| Published | 2026-05-08 |
| Last modified | 2026-10-26 |
Last updated 2026-10-26 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-41507?
math-codegen: upgrade to 0.4.3. Exact commands for each OS are on this page.
Is CVE-2026-41507 being exploited?
CVE-2026-41507 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-41507 affect?
CVE-2026-41507 affects math-codegen. Severity is critical (CVSS 9.8). 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 arbitrar
How urgent is CVE-2026-41507?
Priority 48/100. Critical severity; Remotely exploitable, no login, no user action