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.
Cite this page
CVE-2026-40194. CVEDatabase.com. Retrieved 1 May 2026. https://cvedatabase.com/cve/CVE-2026-40194
Use CWE-208, Phpseclib vendor hub and Phpseclib product page to widen CVE-2026-40194 into its surrounding weakness, vendor, and product context.
Compare it with CVE-2026-32935, CVE-2023-52892 and CVE-2024-27355 for nearby disclosures in the same product family.