CWE · MITRE source
CWE-562Return of Stack Variable Address
A function returns the address of a stack variable.
Because local variables are allocated on the stack, when a program returns a pointer to a local variable, it is returning a stack address. A subsequent function call is likely to re-use this same stack address, thereby overwriting the value of the pointer, which no longer corresponds to the same variable since a function's stack frame is invalidated when it returns. At best this will cause the value of the pointer to change unexpectedly. In many cases it causes the program to crash the next time the pointer is dereferenced.
Last updated: 28 November 2026 15:29 UTC
Cumulative inbound coverage
How completely the frameworks we cross-walk collectively cover this — the verdict is the strongest single mapping (overlapping partials are not summed); breadth shows the corroboration behind it.
Collective: full · 15 mapping(s) from 4 framework(s): ATT&CK 8 (full) · 800-53 3 (mostly) · ISO_IEC_27002_2022 3 (partial) · 1 (mostly)
Control responseHuman-reviewed
Answering this weakness across the control lifecycle, from our framework cross-walks.
NIST 800-53 r5 controls PROPOSED for this weakness (0)
These are model PROPOSALS, not graded mappings. They come
from controls_to_cwe_proposals, which carries no grade field at
all; across the CWE pages 1,540 of 1,722 such associations (89%) have never
been graded by anything. The heading said “address” until
2026-09-29, which asserted a relationship the data does not carry.
Graded cross-walks are on the framework map, not here.
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
MITRE ATT&CK techniques this weakness enables
Our own two-way CWE↔ATT&CK cross-walk — a direct mapping with no public source (the CWE→CAPEC→ATT&CK chain leaves most top weaknesses, incl. XSS and SQLi, mapped to nothing).
Direction: ← other covers this;
→ this covers other (F/M/P = full / mostly /
partial). gov = governs / implements (a mandate, not coverage).
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2022-41837 UPD | 7.6 | 9.8 | 0.0153 | 2022-12-22 |
CVE-2021-21798 UPD | 7.1 | 7.8 | 0.2137 | 2021-09-15 |
CVE-2024-33045 UPD | 6.1 | 8.4 | 0.0018 | 2024-09-02 |
CVE-2026-52790 | 5.9 | 7.5 | 0.0049 | 2026-11-13 |
CVE-2024-4418 UPD | 4.9 | 6.2 | 0.0050 | 2024-05-08 |
CVE-2026-102959 | 4.8 | 6.4 | 0.0028 | 2026-11-25 |
CVE-2020-21686 UPD | 4.4 | 5.5 | 0.0044 | 2023-08-22 |
CVE-2026-3591 UPD | 4.4 | 5.4 | 0.0039 | 2026-03-25 |
CVE-2026-26399 | 4.0 | 5.3 | 0.0015 | 2026-04-20 |
CVE-2026-34553 UPD | 3.3 | 4.0 | 0.0020 | 2026-03-31 |