CWE一覧に戻る
CWE-500

パブリック・スタティック・フィールド

Public Static Field Not Marked Final
脆弱性 レビュー中
JA

オブジェクトには、finalとマークされていないパブリックな静的フィールドがあり、それが予期せぬ方法で変更される可能性がある。

パブリック静的変数は、アプリケーション内のどのクラスからも、アクセサなしで読み取ったり、ミューテータなしで変更したりできます。

EN

An object contains a public static field that is not marked final, which might allow it to be modified in unexpected ways.

Public static variables can be read without an accessor and changed without a mutator by any classes in the application.

Scope: Integrity / Impact: Modify Application Data
Scope: Confidentiality / Impact: Read Application Data
Clearly identify the scope for all critical data elements, including whether they should be regarded as static.
Make any static fields private and constant.

A constant field is denoted by the keyword 'const' in C/C++ and ' final' in Java
MITRE公式ページ — CWE-500