| Name | CVE-2026-40194 |
| Description | phpseclib is a PHP secure communications library. 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| php-phpseclib (PTS) | bullseye | 2.0.30-2+deb11u2 | vulnerable |
| bullseye (security) | 2.0.30-2+deb11u1 | vulnerable | |
| bookworm | 2.0.42-1+deb12u2 | vulnerable | |
| bookworm (security) | 2.0.42-1+deb12u3 | vulnerable | |
| trixie | 2.0.48-3 | vulnerable | |
| trixie (security) | 2.0.48-3+deb13u1 | vulnerable | |
| forky, sid | 2.0.52-1 | vulnerable | |
| php-phpseclib3 (PTS) | bookworm | 3.0.19-1+deb12u3 | vulnerable |
| bookworm (security) | 3.0.19-1+deb12u4 | vulnerable | |
| trixie | 3.0.43-2 | vulnerable | |
| trixie (security) | 3.0.43-2+deb13u1 | vulnerable | |
| forky, sid | 3.0.50-1 | vulnerable | |
| phpseclib (PTS) | bullseye | 1.0.19-3+deb11u2 | vulnerable |
| bullseye (security) | 1.0.19-3+deb11u3 | vulnerable | |
| bookworm | 1.0.20-1+deb12u2 | vulnerable | |
| bookworm (security) | 1.0.20-1+deb12u3 | vulnerable | |
| trixie | 1.0.23-6 | vulnerable | |
| trixie (security) | 1.0.23-6+deb13u1 | vulnerable | |
| sid | 1.0.27-1 | vulnerable |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| php-phpseclib | source | (unstable) | (unfixed) | |||
| php-phpseclib3 | source | (unstable) | (unfixed) | |||
| phpseclib | source | (unstable) | (unfixed) |
[trixie] - php-phpseclib3 <no-dsa> (Minor issue)
[bookworm] - php-phpseclib3 <no-dsa> (Minor issue)
[trixie] - php-phpseclib <no-dsa> (Minor issue)
[bookworm] - php-phpseclib <no-dsa> (Minor issue)
[trixie] - phpseclib <no-dsa> (Minor issue)
[bookworm] - phpseclib <no-dsa> (Minor issue)
https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx
Fixed by: https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac (3.0.51, 2.0.53, 1.0.28)