# CVE-2026-40194: php-phpseclib: phpseclib is a PHP secure communications library

CVE-2026-40194 is fixed in 3 products on 1 platform, first by DEBIAN-CVE-2026-40194, released April 10, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-40194
- Priority: Routine
- CVSS: 3.7 (low)
- EPSS: 0.0037
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Apr 10, 2026

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | php-phpseclib Debian 12.15 (bookworm) | 2.0.42-1+deb12u4 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | php-phpseclib Debian 13.5 (trixie) | 2.0.48-3+deb13u2 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | php-phpseclib Debian 14 | 2.0.53-1 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | php-phpseclib Ubuntu 18.04.6 LTS (bionic) | 2.0.9-1ubuntu0.1~esm3 | [php-phpseclib 2.0.9-1ubuntu0.1~esm3](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-php-phpseclib-2.0.9-1ubuntu0.1-esm3.md) | May 12, 2026 |
| Linux | php-phpseclib Ubuntu 20.04 LTS (focal) | 2.0.23-2ubuntu0.1~esm3 | [php-phpseclib 2.0.23-2ubuntu0.1~esm3](https://patchblox.com/security/data/fix/linux/ubuntu-focal-php-phpseclib-2.0.23-2ubuntu0.1-esm3.md) | May 12, 2026 |
| Linux | php-phpseclib Ubuntu 22.04.1 LTS (jammy) | 2.0.36-1ubuntu0.1~esm3 | [php-phpseclib 2.0.36-1ubuntu0.1~esm3](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-php-phpseclib-2.0.36-1ubuntu0.1-esm3.md) | May 12, 2026 |
| Linux | php-phpseclib Ubuntu 24.04.5 LTS (noble) | 2.0.47-1ubuntu0.1~esm1 | [php-phpseclib 2.0.47-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-php-phpseclib-2.0.47-1ubuntu0.1-esm1.md) | May 12, 2026 |
| Linux | php-phpseclib Ubuntu 26.04.1 LTS (resolute) | 2.0.51-1ubuntu0.1~esm1 | [php-phpseclib 2.0.51-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-php-phpseclib-2.0.51-1ubuntu0.1-esm1.md) | May 12, 2026 |
| Linux | php-phpseclib3 Debian 12.15 (bookworm) | 3.0.19-1+deb12u5 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | php-phpseclib3 Debian 13.5 (trixie) | 3.0.43-2+deb13u2 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | php-phpseclib3 Debian 14 | 3.0.51-1 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | phpseclib Debian 12.15 (bookworm) | 1.0.20-1+deb12u4 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |
| Linux | phpseclib Debian 13.5 (trixie) | 1.0.23-6+deb13u2 | [DEBIAN-CVE-2026-40194](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40194.md) | Apr 10, 2026 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
