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
1 result · Feed
-
High 8.8CVE-2024-3833 EPSS 18%
Object corruption in WebAssembly in Google Chrome prior to 124.0.6367.60 allowed a remote attacker to potentially explo…