CWE-375Returning a Mutable Object to an Untrusted Caller

PUBLISHEDweakness recordMedium
released 2006-07-19 · last modified 2025-12-11

Metadata

CWE ID:
CWE-375
摘要:
Base
结构:
Simple
状态:
Draft
发布日期:
2006-07-19
更新日期:
2025-12-11

名称

Returning a Mutable Object to an Untrusted Caller

描述

Sending non-cloned mutable data as a return value may result in that data being altered or deleted by the calling function.

In situations where functions return references to mutable data, it is possible that the external code which called the function may make changes to the data sent. If this data was not previously cloned, the class will then be using modified data which may violate assumptions about its internal state.

常见后果

范围:
Access Control, Integrity
影响:
Modify Memory
注释:
Potentially data could be tampered with by another function which should not have been tampered with.

相关 CWE