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
| Ecosystem | Package | Affected versions |
|---|---|---|
| Ubuntu:Pro:16.04:LTS | php-phpseclib | All versions before 2.0.1-1ubuntu0.1~esm1 (fixed in 2.0.1-1ubuntu0.1~esm1) |
| Ubuntu:Pro:16.04:LTS | phpseclib | All versions, no fix listed |
| Ubuntu:Pro:18.04:LTS | php-phpseclib | All versions before 2.0.9-1ubuntu0.1~esm3 (fixed in 2.0.9-1ubuntu0.1~esm3) |
| Ubuntu:Pro:18.04:LTS | phpseclib | All versions, no fix listed |
| Ubuntu:Pro:20.04:LTS | php-phpseclib | All versions before 2.0.23-2ubuntu0.1~esm3 (fixed in 2.0.23-2ubuntu0.1~esm3) |
| Ubuntu:Pro:20.04:LTS | phpseclib | All versions, no fix listed |
| Ubuntu:Pro:22.04:LTS | php-phpseclib | All versions before 2.0.36-1ubuntu0.1~esm3 (fixed in 2.0.36-1ubuntu0.1~esm3) |
| Ubuntu:Pro:22.04:LTS | php-phpseclib3 | All versions, no fix listed |
| Ubuntu:Pro:22.04:LTS | phpseclib | All versions, no fix listed |
| Ubuntu:24.04:LTS | php-phpseclib3 | All versions, no fix listed |
| Ubuntu:Pro:24.04:LTS | php-phpseclib | All versions before 2.0.47-1ubuntu0.1~esm1 (fixed in 2.0.47-1ubuntu0.1~esm1) |
| Ubuntu:Pro:24.04:LTS | phpseclib | All versions, no fix listed |
| Ubuntu:25.10 | php-phpseclib | All versions, no fix listed |
| Ubuntu:25.10 | php-phpseclib3 | All versions, no fix listed |
| Ubuntu:25.10 | phpseclib | All versions, no fix listed |
| Ubuntu:26.10 | php-phpseclib3 | All versions, no fix listed |
| Ubuntu:26.10 | phpseclib | All versions, no fix listed |
| Ubuntu:26.04:LTS | php-phpseclib3 | All versions, no fix listed |
| Ubuntu:Pro:26.04:LTS | php-phpseclib | All versions before 2.0.51-1ubuntu0.1~esm1 (fixed in 2.0.51-1ubuntu0.1~esm1) |
| Ubuntu:Pro:26.04:LTS | phpseclib | All versions, no fix listed |
References
- https://ubuntu.com/security/CVE-2026-40194
- https://www.cve.org/CVERecord?id=CVE-2026-40194
- https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx
- https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac
- https://github.com/phpseclib/phpseclib/releases/tag/1.0.28
- https://github.com/phpseclib/phpseclib/releases/tag/2.0.53
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.51
- https://ubuntu.com/security/notices/USN-8830-1