An attacker with valid credentials can cause a denial of service for IMAP by selecting a compression algorithm for the connection that requires excessive memory for its decompression state. By opening several such connections, the process memory limit is reached, resulting in the termination of the process and all associated connections.