In a known-plaintext attack, an attacker uses known plaintext and ciphertext to break the encryption and access sensitive information.