{"cve":"CVE-2026-41507","nvd":{"published":"2026-05-08T14:16:34.133","modified":"2026-10-26T19:10:00.163","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-94"],"references":["https://github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b","https://github.com/mauriciopoppe/math-codegen/pull/11","https://github.com/mauriciopoppe/math-codegen/security/advisories/GHSA-p6x5-p4xf-cc4r"],"products":["mauriciopoppe:math-codegen"],"source":"nvd","synced_at":"2026-10-26T19:31:02.781428341+00:00"},"epss":{"cve":"CVE-2026-41507","score":0.00393,"percentile":0.33222,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-p6x5-p4xf-cc4r","url":"https://osv.dev/vulnerability/GHSA-p6x5-p4xf-cc4r","summary":"Remote Code Execution (RCE) via String Literal Injection into math-codegen","modified":"2026-05-12T17:16:37.269274Z","packages":[{"ecosystem":"npm","name":"math-codegen","purl":"pkg:npm/math-codegen","ranges":["<0.4.3"],"fixed":["0.4.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}