CWE一覧に戻る
CWE-99

リソース識別子の不適切な制御(「リソース・インジェクション)

Improper Control of Resource Identifiers ('Resource Injection')
脆弱性 レビュー中
JA

製品が上流のコンポーネントから入力を受け取るが、その入力が意図された制御範囲外にある可能性のあるリソースの識別子として使用される前に、その入力を制限しないか、誤って制限している。

リソース・インジェクションの問題は、以下の2つの条件が満たされた場合に発生する:

これにより、攻撃者は保護されているシステム・リソースにアクセスしたり、変更したりすることが可能になります。

EN

The product receives input from an upstream component, but it does not restrict or incorrectly restricts the input before it is used as an identifier for a resource that may be outside the intended sphere of control.

A resource injection issue occurs when the following two conditions are met:

This may enable an attacker to access or modify otherwise protected system resources.

Scope: Confidentiality, Integrity / Impact: Read Application Data; Modify Application Data; Read Files or Directories; Modify Files or Directories
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, it can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
MITRE公式ページ — CWE-99