CWE-491: Public cloneable() Method Without Final ('Object Hijack')
CWE版本: 4.18
更新日期: 2025-09-09
弱点描述
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.
常见后果
影响范围: Integrity Other
技术影响: Unexpected State Varies by Context
潜在缓解措施
阶段: Implementation
描述: Make the cloneable() method final.
引入模式
| 阶段 | 说明 |
|---|---|
| Implementation | - |
适用平台
编程语言
分类映射
| 分类名称 | 条目ID | 条目名称 | 映射适配度 |
|---|---|---|---|
| 7 Pernicious Kingdoms | - | Mobile Code: Object Hijack | - |
| The CERT Oracle Secure Coding Standard for Java (2011) | OBJ07-J | Sensitive classes must not let themselves be copied | - |
| Software Fault Patterns | SFP28 | Unexpected access points | - |