This weakness occurs when a persistent data object lacks the necessary methods to be properly compared, which can lead to inconsistent or incorrect behavior when the system checks for equality or manages collections.
For reliable operation, objects designed for long-term storage (like those saved to a database or cached) must have explicit comparison logic. In Java, for instance, a persistent class requires both an `equals()` method to define what makes two instances identical and a `hashCode()` method to ensure consistent behavior in hash-based collections like `HashMap` or `HashSet`. Without these, the object's comparisons become unreliable. This inconsistency can cause subtle bugs, such as duplicate entries in a set, failed lookups, or corrupted data structures, degrading the application's reliability. If an attacker can trigger or exploit this flawed comparison logic, these reliability issues may escalate into security vulnerabilities, such as data corruption, denial of service, or unexpected access control bypasses.
Impact: Reduce Reliability