CWE一覧に戻る
CWE-1288

入力内の一貫性の不適切な検証

Improper Validation of Consistency within Input
脆弱性 作成中
JA

この製品は、複数の要素またはフィールドを持つ複雑な入力を受信し、それらが互いに整合している必要がありますが、入力が実際に整合していることを検証しないか、誤って検証します。

入力データの中には、複数の要素やフィールドで構成され、互いに整合性がとれてい なければならないものがある。 このような複雑な入力に一貫性がない場合、攻撃者は予期せぬエラーを引き起こしたり、不正なアクションを実行させたり、潜在的な脆弱性を悪用したりする可能性がある。

EN

The product receives a complex input with multiple elements or fields that must be consistent with each other, but it does not validate or incorrectly validates that the input is actually consistent.

Some input data can be structured with multiple elements or fields that must be consistent with each other, e.g. a number-of-items field that is followed by the expected number of elements. When such complex inputs are inconsistent, attackers could trigger unexpected errors, cause incorrect actions to take place, or exploit latent vulnerabilities.

Scope: Other / Impact: Varies by Context
Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
MITRE公式ページ — CWE-1288