CVE Explorer
CVE-2026-41507
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.
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"math-codegen","vendor":"mauriciopoppe","versions":[{"status":"affected","version":"< 0.4.3"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:227fe7e456d5f2f942f5c2c5609fa42b87778db45bc26e43511332772aacfe67 · sha256:920fc639f1fdc846… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:227fe7e456d5f2f942f5c2c5609fa42b87778db45bc26e43511332772aacfe67 · sha256:920fc639f1fdc846… · /containers/cna/metrics/0/cvssV3_1
CWE assertions
1 source assertion{"cweId":"CWE-94","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:227fe7e456d5f2f942f5c2c5609fa42b87778db45bc26e43511332772aacfe67 · sha256:920fc639f1fdc846… · /containers/cna/problemTypes/0/descriptions/0
Source references
3 source assertions{"name":"https://github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b","tags":["x_refsource_MISC"],"url":"https://github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:227fe7e456d5f2f942f5c2c5609fa42b87778db45bc26e43511332772aacfe67 · sha256:920fc639f1fdc846… · /containers/cna/references/2
{"name":"https://github.com/mauriciopoppe/math-codegen/pull/11","tags":["x_refsource_MISC"],"url":"https://github.com/mauriciopoppe/math-codegen/pull/11"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:227fe7e456d5f2f942f5c2c5609fa42b87778db45bc26e43511332772aacfe67 · sha256:920fc639f1fdc846… · /containers/cna/references/1
{"name":"https://github.com/mauriciopoppe/math-codegen/security/advisories/GHSA-p6x5-p4xf-cc4r","tags":["x_refsource_CONFIRM"],"url":"https://github.com/mauriciopoppe/math-codegen/security/advisories/GHSA-p6x5-p4xf-cc4r"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:227fe7e456d5f2f942f5c2c5609fa42b87778db45bc26e43511332772aacfe67 · sha256:920fc639f1fdc846… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.