A heap-based buffer overflow occurs when a program writes more data to a heap memory block than it can hold, potentially corrupting memory. This flaw allows an unauthorized attacker to execute arbitrary code remotely over a network by sending crafted input. The attack does not require prior authentication.