{"id":"CVE-2026-41507","sourceIdentifier":"security-advisories@github.com","published":"2026-05-08T14:16:34.133","lastModified":"2026-06-17T10:46:49.027","vulnStatus":"Analyzed","cveTags":[],"descriptions":[{"lang":"en","value":"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."}],"affected":[{"source":"security-advisories@github.com","affectedData":[{"vendor":"mauriciopoppe","product":"math-codegen","versions":[{"version":"< 0.4.3","status":"affected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-05-08T14:20:14.868190Z","id":"CVE-2026-41507","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"security-advisories@github.com","type":"Secondary","description":[{"lang":"en","value":"CWE-94"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:mauriciopoppe:math-codegen:*:*:*:*:*:*:*:*","versionEndExcluding":"0.4.3","matchCriteriaId":"8965334E-695A-4505-BADF-4FDDD9C14CC4"}]}]}],"references":[{"url":"https://github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b","source":"security-advisories@github.com","tags":["Patch"]},{"url":"https://github.com/mauriciopoppe/math-codegen/pull/11","source":"security-advisories@github.com","tags":["Issue Tracking"]},{"url":"https://github.com/mauriciopoppe/math-codegen/security/advisories/GHSA-p6x5-p4xf-cc4r","source":"security-advisories@github.com","tags":["Vendor Advisory"]}]}