A heap-based buffer overflow allows an unauthorized attacker to execute arbitrary code over a network, which can affect the system. A heap-based buffer overflow occurs when an application writes more data to a heap-allocated memory block than it can hold, potentially corrupting adjacent memory.