CWE-121: Stack-based Buffer Overflow
4 real-world CVEs classified as CWE-121: Stack-based Buffer Overflow. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2025-22457critical 9.02025
Ivanti Connect Secure X-Forwarded-For overflow
The web dispatcher measures a digits-and-periods prefix in a configurable client-IP header, then passes that attacker-derived length as the capacity for fixed stack destinations.
- CVE-2025-0282critical 9.02025
Ivanti Connect Secure IF-T clientCapabilities overflow
A pre-authentication IF-T handler passes an attacker-controlled string length to strncpy while copying into a 256-byte stack buffer, so an oversized clientCapabilities value overwrites adjacent stack data.
- CVE-2020-16898high 8.82020
Bad Neighbor: Windows IPv6 Router Advertisement stack overflow
An even RDNSS length makes the parser reinterpret eight trailing bytes as a new option, whose disguised oversized length and fragmented storage force a controlled copy into a fixed kernel stack buffer.
- CVE-2017-11882high 7.82017
Equation Editor stack buffer overflow (CVE-2017-11882)
A record parser copies a variable-length name field into a fixed 40-byte stack buffer with no length check, so an oversized name overwrites the saved return address.