CWE一覧に戻る
CWE-493

最終修飾子なしのクリティカルなパブリック変数

Critical Public Variable Without Final Modifier
脆弱性 レビュー中
JA

この製品には、クリティカルなパブリック変数があり、その変数は最終値ではないため、予期しない値を含むように変更される可能性がある。

フィールドがfinalでなくpublicである場合、そのフィールドを含むクラスにアクセスできる関数であれば、値が設定された時点で変更することができる。これは、プログラムの他の部分がそのフィールドの内容を推測した場合、脆弱性につながる可能性がある。

EN

The product has a critical public variable that is not final, which allows the variable to be modified to contain unexpected values.

If a field is non-final and public, it can be changed once the value is set by any function that has access to the class which contains the field. This could lead to a vulnerability if other parts of the program make assumptions about the contents of that field.

Scope: Integrity / Impact: Modify Application Data
Scope: Confidentiality / Impact: Read Application Data
Declare all public fields as final when possible, especially if it is used to maintain internal state of an Applet or of classes used by an Applet. If a field must be public, then perform all appropriate sanity checks before accessing the field from your code.
MITRE公式ページ — CWE-493