CWE一覧に戻る
CWE-624

実行可能な正規表現エラー

Executable Regular Expression Error
脆弱性 作成中
JA

この製品は、(1)ユーザーが制御できる入力を持つ実行可能なコンポーネントを含むか、(2)ユーザーがパターン修飾子を挿入することで実行を可能にする、いずれかの正規表現を使用する。

ケース(2)は、PHPのpreg_replace()関数で可能であり、おそらく他の言語でも、ユーザー制御の入力が、後に正規表現として解析される文字列に挿入される場合に可能です。

EN

The product uses a regular expression that either (1) contains an executable component with user-controlled inputs, or (2) allows a user to enable execution by inserting pattern modifiers.

Case (2) is possible in the PHP preg_replace() function, and possibly in other languages when a user-controlled input is inserted into a string that is later parsed as a regular expression.

Scope: Confidentiality, Integrity, Availability / Impact: Execute Unauthorized Code or Commands
The regular expression feature in some languages allows inputs to be quoted or escaped before insertion, such as \Q and \E in Perl.
MITRE公式ページ — CWE-624