The key difference is: a vulnerability is a weakness, an exploit takes advantage of that weakness, and a threat is something that could cause harm.
Vulnerability: A weakness in software, hardware, settings, or security procedures. For example, a flaw in a website’s login system might allow someone to bypass authentication. The weakness exists even if nobody has used it yet. NIST: Vulnerability
Exploit: Code, a technique, or a sequence of actions that takes advantage of a vulnerability. In the website example, an exploit could be a specially crafted request that uses the login flaw to gain unauthorized access. IBM: Vulnerability exploitation
Threat: A circumstance or event that could harm systems, information, or operations. In this example, the threat is an attacker breaking into the website and stealing customer information. The person or group carrying out the attack is called a threat actor. Threats can also be accidental or environmental, such as human error or a flood—not every threat involves an exploit. NIST: Threat
Think of a building:
- Vulnerability: A defective door lock.
- Exploit: A technique that bypasses that defective lock.
- Threat: A potential break-in and theft.
They describe different parts of the same security problem: what is weak, how it can be taken advantage of, and what could go wrong. A vulnerability is a weakness, an exploit is a way to take advantage of that weakness, and a threat is something that could cause harm.
For example: a broken lock is the vulnerability, the technique used to bypass it is the exploit, and a potential break-in is the threat.