What is software bug?

Bug is an error or flaw in code of a software application that either can render this application unusable, or make them fail in their major objective. Sometimes code bugs may contribute to a higher level of insecurity or instability.

Some bugs discovered by security engineers in software products may be classified as vulnerabilities and thus may be exploited by a malicious user to gain access to the affected machine.