CWE-498

Cloneable Class Containing Sensitive Information

High

Description

The code contains a class with sensitive data, but the class is cloneable. The data can then be accessed by cloning the class.

Potential Impact

How to Fix

Implementation

If you do make your classes clonable, ensure that your clone method is final and throw super.clone().

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-498 vulnerabilities in your codebase.

Get Security Assessment