CWE一覧に戻る
CWE-625

許容正規表現

Permissive Regular Expression
脆弱性 レビュー中
JA

この製品は正規表現を使用していますが、許可される値のセットを十分に制限していません。

これにより、正規表現がパターンにマッチする部分文字列を受け入れるようになり、ターゲットとの部分比較が行われる。場合によっては、これが他の弱点につながることもある。よくあるエラーは以下の通りである:

EN

The product uses a regular expression that does not sufficiently restrict the set of allowed values.

This effectively causes the regexp to accept substrings that match the pattern, which produces a partial comparison to the target. In some cases, this can lead to other weaknesses. Common errors include:

Scope: Access Control / Impact: Bypass Protection Mechanism
When applicable, ensure that the regular expression marks beginning and ending string patterns, such as "/^string$/" for Perl.
MITRE公式ページ — CWE-625