Common Weakness Enumeration

    CWE Definition / CWE-562

    CWE-562: Return of Stack Variable Address

    A function returns the address of a stack variable, which will cause unintended program behavior, typically in the form of a crash.

    Published:19 Jul 2006
    Organization:MITRE
    Modified:30 Apr 2026

    Related Weakness

    CWE-758: Reliance on Undefined, Unspecified, or Implementation-Defined Behavior

    CWE-672: Operation on a Resource after Expiration or Release

    CWE-825: Expired Pointer Dereference