A critical remote code execution vulnerability has been discovered in OpenSSH, tracked as CVE-2025-3841. The flaw affects versions 8.5 through 9.7 and has been confirmed on major Linux distributions.

What is the vulnerability?

The vulnerability exists in the pre-authentication phase of the SSH handshake. A specially crafted packet can trigger a heap buffer overflow, allowing arbitrary code execution with root privileges.

Who is affected?

Security researchers estimate approximately 14 million internet-facing servers are running a vulnerable version. AWS, Google Cloud, and Azure have all issued advisories.

What should you do?

Upgrade OpenSSH to version 9.8p1 immediately. As an interim mitigation, set LoginGraceTime to 0 in your sshd_config file.