CVE-2026-41507: Vulnerability in Mauriciopoppe Math-codegen
Critical. 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...
npm, CWE-94
- Exploitation
- None confirmed
- Severity
- 9.8 of 10
- Attack likelihood
- 0.7 % in 30 days
- Fix
- Fixed version known
- Patch deadline
- No deadline set
Details
- Advisory ID
- GHSA-p6x5-p4xf-cc4r
- EU ID
- EUVD-2026-28597
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weakness
- CWE-94
- Published
- 17 Apr 2026
- Last change
- 26 Oct 2026
- Likelihood rank
- Higher than 47 % of all rated vulnerabilities
- Analysis status
- Analyzed
- Ecosystem
- npm
Affected products
Affected versions and the first fixed release
- Mauriciopoppe Math-codegen Before 0.4.3. Fixed in 0.4.3
Affected packages
Vulnerable version ranges and fixed releases
- math-codegen npm, Affected before 0.4.3. Fixed in 0.4.3
Advisories
Vendor and security advisories
Patches and fixes
Updates, commits and release notes
- github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b
- github.com/mauriciopoppe/math-codegen/pull/11
Related
- Math-codegen vulnerabilities Recent advisories, watch this product