CVE-2026-40194phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()
- 3.7LowCVSS base score
- 0.37%Exploitation in 30 daysEPSS · top 69% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. A reference of the record is tagged as an exploit. CISA's SSVC rates its exploitation: a proof of concept is public.
Show the exploits1
References tagged exploit1 reference
- https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx (opens in a new tab)x_refsource_CONFIRMexploit
Timeline
ID reserved
By GitHub_M
- 1 day later
· 1 day later
Published
- 28 days later
· 28 days later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
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.37% · top 69% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Low 3.7.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistphpseclib/phpseclibGHSA-r854-jrxh-36qx (opens in a new tab)
References
References5
- 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)
- EUVD EUVD-2026-21597 (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://cveledger.app/cve/CVE-2026-40194)Record last updated .