製品・ソフトウェアに関する情報
Mauricio Poppe (mauriciopoppe)のmath-codegenにおけるコードインジェクションの脆弱性
Title Mauricio Poppe (mauriciopoppe)のmath-codegenにおけるコードインジェクションの脆弱性
Summary

math-codegenは数学的表現からコードを生成します。バージョン0.4.3以前では、cg.parse()に渡される文字列リテラルの内容がサニタイズされることなく新しいFunction()の本体にそのまま挿入されていました。これにより、攻撃者はユーザーが制御する入力がパーサーに到達した場合に任意のシステムコマンドを実行できる可能性がありました。ユーザー入力がcg.parse()に流れる数式評価のエンドポイントを公開しているアプリケーションは完全なリモートコード実行(RCE)の脆弱性を抱えていました。この問題はバージョン0.4.3で修正されています。

Possible impacts 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
Solution

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date May 8, 2026, midnight
Registration Date May 14, 2026, 10:12 a.m.
Last Update May 14, 2026, 10:12 a.m.
CVSS3.0 : 緊急
Score 9.8
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected System
Mauricio Poppe (mauriciopoppe)
math-codegen 0.4.3 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年05月14日]
  掲載
May 14, 2026, 10:12 a.m.

NVD Vulnerability Information
CVE-2026-41507
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.

Publication Date May 8, 2026, 11:16 p.m.
Registration Date May 9, 2026, 4:12 a.m.
Last Update May 12, 2026, 11:26 p.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:mauriciopoppe:math-codegen:*:*:*:*:*:*:*:* 0.4.3
Related information, measures and tools
Common Vulnerabilities List