CVE Vulnerabilities

CVE-2026-40194

Observable Timing Discrepancy

Published: Apr 10, 2026 | Modified: Jun 17, 2026
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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, phpseclibNetSSH2::get_binary_packet() uses PHPs != 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.

Weakness

Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.

Affected Software

NameVendorStart VersionEnd Version
PhpseclibPhpseclib*1.0.27 (including)
PhpseclibPhpseclib2.0.0 (including)2.0.53 (excluding)
PhpseclibPhpseclib3.0.0 (including)3.0.51 (excluding)
Php-phpseclibUbuntuesm-apps/xenial*
Php-phpseclibUbuntuquesting*
Php-phpseclibUbuntuupstream*
Php-phpseclib3Ubuntuquesting*
Php-phpseclib3Ubuntuupstream*
PhpseclibUbuntuesm-apps/xenial*
PhpseclibUbuntuquesting*

References