Skip to main content
← All vulnerabilities
CVE-2026-41507GHSA-P6X5-P4XF-CC4R

Remote Code Execution (RCE) via String Literal Injection into math-codegen

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.4.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • mauriciopoppe math-codegen

    fixed in 0.4.3

  • math-codegennpm

    fixed in 0.4.3

References 3

GitHub · mauriciopoppe/math-codegen