CWE-375: Returning a Mutable Object to an Untrusted Caller
The code sends non-cloned mutable data as a return value may result in that data being altered or deleted by the calling function.
Last updated
Overview
CWE-375 (Returning a Mutable Object to an Untrusted Caller) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-375 is exploited.
Modify Memory
Affects: Access Control, Integrity
The muitable data could be altered or deleted by the calling function. If this data was not previously cloned, the class will then be using modified data which may violate assumptions about its internal state.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages