CWE-495: Private Data Structure Returned From A Public Method
The product has a method that is declared public, but returns a reference to a private data structure, which could then be modified in unexpected ways.
Last updated
Overview
CWE-495 (Private Data Structure Returned From A Public Method) is a variant-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.
Real-world CVEs
1 recorded CVEs are caused by CWE-495 (Private Data Structure Returned From A Public Method). The highest-severity and most recent are shown first. 0 new CWE-495 CVEs have been recorded so far in 2026 (1 in 2025).
Common consequences
What can happen when CWE-495 is exploited.
Modify Application Data
Affects: Integrity
The contents of the data structure can be modified from outside the intended scope.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.