{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-41507","id":"CVE-2026-41507","title":"Remote Code Execution (RCE) via String Literal Injection into math-codegen","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 v","descriptionLong":"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.","published":"2026-05-08T13:49:34.091Z","updated":"2026-10-28T02:30:22.994226221Z","reserved":"2026-04-20T18:18:50.681Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["mauriciopoppe math-codegen"],"affectedProducts":[{"vendor":"mauriciopoppe","product":"math-codegen","defaultStatus":null,"versions":[{"version":"< 0.4.3","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"math-codegen","purl":"pkg:npm/math-codegen","ranges":["<0.4.3"],"fixed":["0.4.3"],"advisory":"GHSA-p6x5-p4xf-cc4r"}],"cwes":["CWE-94"],"aliases":["GHSA-p6x5-p4xf-cc4r"],"references":[{"url":"https://github.com/mauriciopoppe/math-codegen/security/advisories/GHSA-p6x5-p4xf-cc4r","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/mauriciopoppe/math-codegen/pull/11","tags":["x_refsource_MISC","Issue Tracking","fix","web"]},{"url":"https://github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41507.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41507","tags":["advisory"]},{"url":"https://github.com/hits3134","tags":["web"]},{"url":"https://github.com/mauriciopoppe/math-codegen","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.00393,"epssPercentile":0.34107,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-41507","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41507","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-41507","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-p6x5-p4xf-cc4r","ok":true,"note":"GHSA-p6x5-p4xf-cc4r"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-41507","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}