Common Weakness Enumeration

    CWE Definition / CWE-495

    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.

    Published:19 Jul 2006
    Organization:MITRE
    Modified:11 Dec 2025

    Related Weakness

    CWE-664: Improper Control of a Resource Through its Lifetime