CVE-2026-41507
Last modified
CVE-2026-41507 is a critical-severity vulnerability rated 9.8/10 on the CVSS scale. 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. EPSS estimates a 0.39% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Mauriciopoppe | Math-Codegen | < 0.4.3 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-41507?
How severe is CVE-2026-41507?
How do I fix CVE-2026-41507?
Are you affected by CVE-2026-41507?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
