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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-208"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40194.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0.1.1"
},
{
"fixed": "1.0.28"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.53"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.0.51"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "ffe48b6b1b1af6963327f0a5330e3aa004a194ac"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "1.0.28",
"range": [
{
"fixed": "8e2adfd761c11421ff4f4b694b4d0db78f3b4355"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "2.0.53",
"range": [
{
"fixed": "2d1a664b940b9b8f367185307dc010d11a2790f3"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "3.0.51",
"range": [
{
"fixed": "d59c94077f9c9915abb51ddb52ce85188ece1748"
}
],
"source": "REFERENCES_TAG"
}
]
}