CVEfocus › CVE database › CVE-2026-40194

CVE-2026-40194phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using !=…

CVSS 3.7 LowEPSS 0.4% (higher than 24% of CVEs)Published 2026-04-10Updated 2026-05-08Assigner: GitHub_M

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.

CWE-208

What to do

Fixed builds are available from Debian, Packagist: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

9Fixed
15Fix pending
2Under investigation
3Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10php-phpseclib3Fix pendingUBUNTU-CVE-2026-40194
Ubuntu 26.10phpseclibFix pendingUBUNTU-CVE-2026-40194
Ubuntu 26.04php-phpseclibFix pending2.0.51-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-40194
Ubuntu 26.04php-phpseclib3Under investigationUBUNTU-CVE-2026-40194
Ubuntu 26.04phpseclibFix pendingUBUNTU-CVE-2026-40194
Ubuntu 25.10php-phpseclibWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40194
Ubuntu 25.10php-phpseclib3Will not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40194
Ubuntu 25.10phpseclibWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40194
Ubuntu 24.04php-phpseclibFix pending2.0.47-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-40194
Ubuntu 24.04php-phpseclib3Under investigationUBUNTU-CVE-2026-40194
Ubuntu 24.04phpseclibFix pendingUBUNTU-CVE-2026-40194
Ubuntu 22.04php-phpseclibFix pending2.0.36-1ubuntu0.1~esm3 (Ubuntu Pro)UBUNTU-CVE-2026-40194
Ubuntu 22.04php-phpseclib3Fix pendingUBUNTU-CVE-2026-40194
Ubuntu 22.04phpseclibFix pendingUBUNTU-CVE-2026-40194
Ubuntu 20.04php-phpseclibFix pending2.0.23-2ubuntu0.1~esm3 (Ubuntu Pro)UBUNTU-CVE-2026-40194
Ubuntu 20.04phpseclibFix pendingUBUNTU-CVE-2026-40194
Ubuntu 18.04php-phpseclibFix pending2.0.9-1ubuntu0.1~esm3 (Ubuntu Pro)UBUNTU-CVE-2026-40194
Ubuntu 18.04phpseclibFix pendingUBUNTU-CVE-2026-40194
Ubuntu 16.04php-phpseclibFix pending2.0.1-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-40194
Ubuntu 16.04phpseclibFix pendingUBUNTU-CVE-2026-40194
Debian 14php-phpseclibFixed2.0.53-1DEBIAN-CVE-2026-40194
Debian 14php-phpseclib3Fixed3.0.51-1DEBIAN-CVE-2026-40194
Debian 13php-phpseclibFixed2.0.48-3+deb13u2DEBIAN-CVE-2026-40194
Debian 13php-phpseclib3Fixed3.0.43-2+deb13u2DEBIAN-CVE-2026-40194
Debian 13phpseclibFixed1.0.23-6+deb13u2DEBIAN-CVE-2026-40194
Debian 12php-phpseclibFixed2.0.42-1+deb12u4DEBIAN-CVE-2026-40194
Debian 12php-phpseclib3Fixed3.0.19-1+deb12u5DEBIAN-CVE-2026-40194
Debian 12phpseclibFixed1.0.20-1+deb12u4DEBIAN-CVE-2026-40194
Packagist libraryphpseclib/phpseclibFixed1.0.28GHSA-r854-jrxh-36qx

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.