结构: Simple
Abstraction: Variant
状态: Draft
被利用可能性: unkown
A public or protected static final field references a mutable object, which allows the object to be changed by malicious code, or accidentally from another package.
cwe_Nature: ChildOf cwe_CWE_ID: 471 cwe_View_ID: 1000 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 471 cwe_View_ID: 699 cwe_Ordinal: Primary
Language: {'cwe_Name': 'Java', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Integrity | Modify Application Data |
策略:
Protect mutable objects by making them private. Restrict access to the getter and setter as well.
Here, an array (which is inherently mutable) is labeled public static final.
bad Java
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
Software Fault Patterns | SFP23 | Exposed Data |