CVE-2026-41507
published critical CVSS 3.1 · 9.8Remote Code Execution (RCE) via String Literal Injection into math-codegen
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| mauriciopoppe | — | math-codegen< 0.4.3 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| mauriciopoppe | math-codegen | < 0.4.3 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')
References
3Provider assertions
2GitHub_M · cna
Remote Code Execution (RCE) via String Literal Injection into math-codegen
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- a79a7c6180cc274498b28656f9e8297f12b7e40028f9dfbb2637eb15972aa32a
- Ingested
- 23 Sep 2026, 09:13:40 UTC
- Source record
- Official CVE record