{"api_version":"1","generated_at":"2026-04-11T20:38:49+00:00","cve":"CVE-2026-40194","urls":{"html":"https://cve.report/CVE-2026-40194","api":"https://cve.report/api/cve/CVE-2026-40194.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-40194","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-40194"},"summary":{"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. 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.","state":"PUBLISHED","assigner":"GitHub_M","published_at":"2026-04-10 21:16:27","updated_at":"2026-04-10 21:16:27"},"problem_types":["CWE-208","CWE-208 CWE-208: Observable Timing Discrepancy"],"metrics":[{"version":"3.1","source":"security-advisories@github.com","type":"Secondary","score":"3.7","severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","baseScore":3.7,"baseSeverity":"LOW","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"NONE","availabilityImpact":"NONE"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"3.7","severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","data":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":3.7,"baseSeverity":"LOW","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}}],"references":[{"url":"https://github.com/phpseclib/phpseclib/releases/tag/3.0.51","name":"https://github.com/phpseclib/phpseclib/releases/tag/3.0.51","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx","name":"https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/phpseclib/phpseclib/releases/tag/1.0.28","name":"https://github.com/phpseclib/phpseclib/releases/tag/1.0.28","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac","name":"https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/phpseclib/phpseclib/releases/tag/2.0.53","name":"https://github.com/phpseclib/phpseclib/releases/tag/2.0.53","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-40194","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40194","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"phpseclib","product":"phpseclib","version":"affected < 1.0.28","platforms":[]},{"source":"CNA","vendor":"phpseclib","product":"phpseclib","version":"affected >= 2.0.0, < 2.0.53","platforms":[]},{"source":"CNA","vendor":"phpseclib","product":"phpseclib","version":"affected >= 3.0.0, < 3.0.51","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"product":"phpseclib","vendor":"phpseclib","versions":[{"status":"affected","version":"< 1.0.28"},{"status":"affected","version":">= 2.0.0, < 2.0.53"},{"status":"affected","version":">= 3.0.0, < 3.0.51"}]}],"descriptions":[{"lang":"en","value":"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."}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":3.7,"baseSeverity":"LOW","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-208","description":"CWE-208: Observable Timing Discrepancy","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-04-10T20:24:06.696Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","shortName":"GitHub_M"},"references":[{"name":"https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx","tags":["x_refsource_CONFIRM"],"url":"https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx"},{"name":"https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac","tags":["x_refsource_MISC"],"url":"https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac"},{"name":"https://github.com/phpseclib/phpseclib/releases/tag/1.0.28","tags":["x_refsource_MISC"],"url":"https://github.com/phpseclib/phpseclib/releases/tag/1.0.28"},{"name":"https://github.com/phpseclib/phpseclib/releases/tag/2.0.53","tags":["x_refsource_MISC"],"url":"https://github.com/phpseclib/phpseclib/releases/tag/2.0.53"},{"name":"https://github.com/phpseclib/phpseclib/releases/tag/3.0.51","tags":["x_refsource_MISC"],"url":"https://github.com/phpseclib/phpseclib/releases/tag/3.0.51"}],"source":{"advisory":"GHSA-r854-jrxh-36qx","discovery":"UNKNOWN"},"title":"phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()"}},"cveMetadata":{"assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","assignerShortName":"GitHub_M","cveId":"CVE-2026-40194","datePublished":"2026-04-10T20:24:06.696Z","dateReserved":"2026-04-09T20:59:17.620Z","dateUpdated":"2026-04-10T20:24:06.696Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-10 21:16:27","lastModifiedDate":"2026-04-10 21:16:27","problem_types":["CWE-208","CWE-208 CWE-208: Observable Timing Discrepancy"],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","baseScore":3.7,"baseSeverity":"LOW","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"NONE","availabilityImpact":"NONE"},"exploitabilityScore":2.2,"impactScore":1.4}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"40194","Ordinal":"1","Title":"phpseclib has a variable-time HMAC comparison in SSH2::get_binar","CVE":"CVE-2026-40194","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"40194","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"phpseclib has a variable-time HMAC comparison in SSH2::get_binar"}]}}}