CWE一覧に戻る
CWE-915

動的に決定されるオブジェクト属性の不適切な制御による変更

Improperly Controlled Modification of Dynamically-Determined Object Attributes
脆弱性 作成中
JA

この製品は、オブジェクトで初期化または更新される複数の属性、プロパティ、またはフィールドを指定する入力を上流のコンポーネントから受け取りますが、どの属性を変更できるかを適切に制御できません。

オブジェクトに内部使用のみを意図した属性が含まれている場合、その予期せぬ変更が脆弱性につながる可能性がある。

この弱点は、大量代入、自動バインディング、オブジェクト・インジェクションのような、それを可能にする言語固有のメカニズムによって知られることがあります。

EN

The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.

If the object contains attributes that were only intended for internal use, then their unexpected modification could lead to a vulnerability.

This weakness is sometimes known by the language-specific mechanisms that make it possible, such as mass assignment, autobinding, or object injection.

Scope: Integrity / Impact: Modify Application Data
Scope: Integrity / Impact: Execute Unauthorized Code or Commands
Scope: Other, Integrity / Impact: Varies by Context; Alter Execution Logic
If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists.

For applications written with Ruby on Rails, use the attr_accessible (allowlist) or attr_protected (denylist) macros in each class that may be used in mass assignment.
If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
For any externally-influenced input, check the input against an allowlist of internal object attributes or fields that are allowed to be modified.
Refactor the code so that object attributes or fields do not need to be dynamically identified, and only expose getter/setter functionality for the intended attributes.
MITRE公式ページ — CWE-915