ADVISORIES

Ubuntu CVE Tracker

UBUNTU-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
Ubuntu:Pro:16.04:LTSphp-phpseclib
All versions before 2.0.1-1ubuntu0.1~esm1 (fixed in 2.0.1-1ubuntu0.1~esm1)
Ubuntu:Pro:16.04:LTSphpseclib
All versions, no fix listed
Ubuntu:Pro:18.04:LTSphp-phpseclib
All versions before 2.0.9-1ubuntu0.1~esm3 (fixed in 2.0.9-1ubuntu0.1~esm3)
Ubuntu:Pro:18.04:LTSphpseclib
All versions, no fix listed
Ubuntu:Pro:20.04:LTSphp-phpseclib
All versions before 2.0.23-2ubuntu0.1~esm3 (fixed in 2.0.23-2ubuntu0.1~esm3)
Ubuntu:Pro:20.04:LTSphpseclib
All versions, no fix listed
Ubuntu:Pro:22.04:LTSphp-phpseclib
All versions before 2.0.36-1ubuntu0.1~esm3 (fixed in 2.0.36-1ubuntu0.1~esm3)
Ubuntu:Pro:22.04:LTSphp-phpseclib3
All versions, no fix listed
Ubuntu:Pro:22.04:LTSphpseclib
All versions, no fix listed
Ubuntu:24.04:LTSphp-phpseclib3
All versions, no fix listed
Ubuntu:Pro:24.04:LTSphp-phpseclib
All versions before 2.0.47-1ubuntu0.1~esm1 (fixed in 2.0.47-1ubuntu0.1~esm1)
Ubuntu:Pro:24.04:LTSphpseclib
All versions, no fix listed
Ubuntu:25.10php-phpseclib
All versions, no fix listed
Ubuntu:25.10php-phpseclib3
All versions, no fix listed
Ubuntu:25.10phpseclib
All versions, no fix listed
Ubuntu:26.10php-phpseclib3
All versions, no fix listed
Ubuntu:26.10phpseclib
All versions, no fix listed
Ubuntu:26.04:LTSphp-phpseclib3
All versions, no fix listed
Ubuntu:Pro:26.04:LTSphp-phpseclib
All versions before 2.0.51-1ubuntu0.1~esm1 (fixed in 2.0.51-1ubuntu0.1~esm1)
Ubuntu:Pro:26.04:LTSphpseclib
All versions, no fix listed

References