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
| Ecosystem | Package | Affected versions |
|---|---|---|
| Debian:12 | php-phpseclib | All versions before 2.0.42-1+deb12u4 (fixed in 2.0.42-1+deb12u4) |
| Debian:13 | php-phpseclib | All versions before 2.0.48-3+deb13u2 (fixed in 2.0.48-3+deb13u2) |
| Debian:14 | php-phpseclib | All versions before 2.0.53-1 (fixed in 2.0.53-1) |
| Debian:12 | php-phpseclib3 | All versions before 3.0.19-1+deb12u5 (fixed in 3.0.19-1+deb12u5) |
| Debian:13 | php-phpseclib3 | All versions before 3.0.43-2+deb13u2 (fixed in 3.0.43-2+deb13u2) |
| Debian:14 | php-phpseclib3 | All versions before 3.0.51-1 (fixed in 3.0.51-1) |
| Debian:12 | phpseclib | All versions before 1.0.20-1+deb12u4 (fixed in 1.0.20-1+deb12u4) |
| Debian:13 | phpseclib | All versions before 1.0.23-6+deb13u2 (fixed in 1.0.23-6+deb13u2) |