{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-40194","id":"CVE-2026-40194","title":"phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()","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)","descriptionLong":"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.","published":"2026-04-10T20:24:06.696Z","updated":"2026-10-28T02:31:04.385644750Z","reserved":"2026-04-09T20:59:17.620Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"GitHub_M"},"metrics":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"GitHub_M"},{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"github.com"},{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"OSV"},{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"GitHub"}],"rating":"low","products":["phpseclib"],"affectedProducts":[{"vendor":"phpseclib","product":"phpseclib","defaultStatus":null,"versions":[{"version":">= 0.1.1, < 1.0.28","status":"affected"},{"version":">= 2.0.0, < 2.0.53","status":"affected"},{"version":">= 3.0.0, < 3.0.51","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"phpseclib/phpseclib","purl":"pkg:composer/phpseclib/phpseclib","ranges":[">=0.1.1 <1.0.28",">=2.0.0 <2.0.53",">=3.0.0 <3.0.51"],"fixed":["1.0.28","2.0.53","3.0.51"],"advisory":"GHSA-r854-jrxh-36qx"}],"cwes":["CWE-208"],"aliases":["GHSA-r854-jrxh-36qx"],"references":[{"url":"https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx","tags":["x_refsource_CONFIRM","exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/phpseclib/phpseclib/releases/tag/1.0.28","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/phpseclib/phpseclib/releases/tag/2.0.53","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/phpseclib/phpseclib/releases/tag/3.0.51","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40194.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40194","tags":["advisory"]},{"url":"https://github.com/phpseclib/phpseclib","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00368,"epssPercentile":0.31295,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-40194","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40194","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-40194","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-r854-jrxh-36qx","ok":true,"note":"GHSA-r854-jrxh-36qx"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-40194","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}