A stack-based buffer overflow is a memory-safety bug that happens when a program copies more data into a stack buffer than it can hold. The extra bytes spill into neighboring stack memory, which can corrupt local variables, saved frame data, or the return address. That corruption may crash the process, or it may let an attacker change execution flow.
In cyber security, this matters because many network-facing services process untrusted input. If an attacker can carefully shape that input, the overflow may become remote code execution, privilege escalation, or a denial of service. Defenders look for this class of flaw in parsers, web services, and appliances that handle external traffic. Mitigations include bounds checking, safe libraries, compiler hardening, stack canaries, ASLR, and rapid patching when a vulnerable component is exposed.


