Back
CVE-2026-40194
phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()
Low3.7EPSS 0.36%
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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), proven by scaling benchmarks. This vulnerability is fixed in 3.0.51, 2.0.53, and 1.0.28.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Low3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVDNVD · Modified | 3.1 | Low3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.36% · top 70% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: Low 3.7.
Weakness
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistphpseclib/phpseclibGHSA-r854-jrxh-36qx (opens in a new tab)
References (5)
- https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx (opens in a new tab)x_refsource_CONFIRMexploit
- https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac (opens in a new tab)x_refsource_MISC
- https://github.com/phpseclib/phpseclib/releases/tag/1.0.28 (opens in a new tab)x_refsource_MISC
- https://github.com/phpseclib/phpseclib/releases/tag/2.0.53 (opens in a new tab)x_refsource_MISC
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.51 (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-r854-jrxh-36qx (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-40194)Record last updated .