Description
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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| phpseclib | phpseclib | >= 0.1.1, < 1.0.28, >= 2.0.0, < 2.0.53, >= 3.0.0, < 3.0.51 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | php-phpseclib | 2.0.53-1 | — |
| Debian 14 | php-phpseclib3 | 3.0.51-1 | — |
| Debian 13 | php-phpseclib | 2.0.48-3+deb13u2 | — |
| Debian 13 | php-phpseclib3 | 3.0.43-2+deb13u2 | — |
| Debian 13 | phpseclib | 1.0.23-6+deb13u2 | — |
| Debian 12 | php-phpseclib | 2.0.42-1+deb12u4 | — |
| Debian 12 | php-phpseclib3 | 3.0.19-1+deb12u5 | — |
| Debian 12 | phpseclib | 1.0.20-1+deb12u4 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | phpseclib +1 | No fix yet | — |
| Ubuntu 26.04 LTS | php-phpseclib3 | No fix yet | — |
| Ubuntu 25.10 | phpseclib +2 | No fix yet | — |
| Ubuntu 24.04 LTS | php-phpseclib3 | No fix yet | — |
| Ubuntu 22.04 LTS | phpseclib | No fix yet | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 26.04 LTS | php-phpseclib | 2.0.51-1ubuntu0.1~esm1 | USN-8830-1 |
| Ubuntu Pro 26.04 LTS | phpseclib | No fix yet | — |
| Ubuntu Pro 24.04 LTS | php-phpseclib | 2.0.47-1ubuntu0.1~esm1 | USN-8830-1 |
| Ubuntu Pro 24.04 LTS | phpseclib | No fix yet | — |
| Ubuntu Pro 22.04 LTS | php-phpseclib | 2.0.36-1ubuntu0.1~esm3 | USN-8830-1 |
| Ubuntu Pro 22.04 LTS | php-phpseclib3 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | php-phpseclib | 2.0.23-2ubuntu0.1~esm3 | USN-8830-1 |
| Ubuntu Pro 20.04 LTS | phpseclib | No fix yet | — |
| Ubuntu Pro 18.04 LTS | php-phpseclib | 2.0.9-1ubuntu0.1~esm3 | USN-8830-1 |
| Ubuntu Pro 18.04 LTS | phpseclib | No fix yet | — |
| Ubuntu Pro 16.04 LTS | php-phpseclib | 2.0.1-1ubuntu0.1~esm1 | USN-8830-1 |
| Ubuntu Pro 16.04 LTS | phpseclib | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | nextcloud-server-33 | 33.0.3-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | phpseclib/phpseclib | >= 0.1.1, < 1.0.28 | 1.0.28 | GHSA-r854-jrxh-36qx |
| Packagist | phpseclib/phpseclib | >= 2.0.0, < 2.0.53 | 2.0.53 | GHSA-r854-jrxh-36qx |
| Packagist | phpseclib/phpseclib | >= 3.0.0, < 3.0.51 | 3.0.51 | GHSA-r854-jrxh-36qx |
Advisories 2
- WID-SEC-2026-1931 Cacti: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 25, 2026
- USN-8830-1 php-phpseclib vulnerabilities Ubuntu Security Notices (USN) · Sep 28, 2026
References
- 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