Weakness (CWE)
CWE-374: Passing Mutable Objects to an Untrusted Method
Base Draft
The product sends non-cloned mutable data as an argument to a method or function.
How to prevent it (2 mitigations)
-
Implementation
Pass in data which should not be altered as constant or immutable.
-
Implementation
Clone all mutable data before passing it into an external function . This is the preferred mitigation. This way, regardless of what changes are made to the data, a valid copy is retained for use by the class.
Source: MITRE CWE-374
0 results · Clear filters · Feed
Nothing found.