A stack buffer overflow is a type of programming error that occurs when a program writes more data to a temporary memory area (called a buffer) on the stack than it can hold. This overflow can overwrite adjacent memory, potentially corrupting data or allowing attackers to execute malicious code. Stack buffer overflows are a common security vulnerability and are often exploited to gain unauthorized access or control over a system. Preventing them requires careful programming practices and the use of security features like bounds checking.