CWE一覧に戻る
CWE-491

Final ('オブジェクト・ハイジャック')なしのパブリックcloneable()メソッド

Public cloneable() Method Without Final ('Object Hijack')
脆弱性 レビュー中
JA

クラスにはfinal宣言されていないcloneable()メソッドがあり、コンストラクタを呼び出さずにオブジェクトを作成できる。これにより、オブジェクトが予期しない状態になることがあります。

EN

A class has a cloneable() method that is not declared final, which allows an object to be created without calling the constructor. This can cause the object to be in an unexpected state.

Scope: Integrity, Other / Impact: Unexpected State; Varies by Context
Make the cloneable() method final.
MITRE公式ページ — CWE-491