A stack-based buffer overflow allows an authorized attacker to execute arbitrary code over a network, which can affect the system. A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than the buffer is allocated to hold, potentially overwriting adjacent memory.