ADVISORIES

Debian Security Tracker

DEBIAN-CVE-2026-40194

Details

phpseclib is a PHP secure communications library. Starting in 0.1.1 and prior to 3.0.51, 2.0.53, and 1.0.28, phpseclib\Net\SSH2::get_binary_packet() uses PHP's != operator to compare a received SSH packet HMAC against the locally computed HMAC. != on equal-length binary strings in PHP uses memcmp(), which short-circuits on the first differing byte. This is a real variable-time comparison (CWE-208), proven by scaling benchmarks. This vulnerability is fixed in 3.0.51, 2.0.53, and 1.0.28.

Affected packages

EcosystemPackageAffected versions
Debian:12php-phpseclib
All versions before 2.0.42-1+deb12u4 (fixed in 2.0.42-1+deb12u4)
Debian:13php-phpseclib
All versions before 2.0.48-3+deb13u2 (fixed in 2.0.48-3+deb13u2)
Debian:14php-phpseclib
All versions before 2.0.53-1 (fixed in 2.0.53-1)
Debian:12php-phpseclib3
All versions before 3.0.19-1+deb12u5 (fixed in 3.0.19-1+deb12u5)
Debian:13php-phpseclib3
All versions before 3.0.43-2+deb13u2 (fixed in 3.0.43-2+deb13u2)
Debian:14php-phpseclib3
All versions before 3.0.51-1 (fixed in 3.0.51-1)
Debian:12phpseclib
All versions before 1.0.20-1+deb12u4 (fixed in 1.0.20-1+deb12u4)
Debian:13phpseclib
All versions before 1.0.23-6+deb13u2 (fixed in 1.0.23-6+deb13u2)

References