๐Ÿ” CVE Alert

CVE-2026-40194

LOW 3.7

phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()

CVSS Score
3.7
EPSS Score
0.0%
EPSS Percentile
1th

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.

CWE CWE-208
Vendor phpseclib
Product phpseclib
Published Apr 10, 2026
Last Updated Apr 13, 2026
Stay Ahead of the Next One

Get instant alerts for phpseclib phpseclib

Be the first to know when new low vulnerabilities affecting phpseclib phpseclib are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Affected Versions

phpseclib / phpseclib
< 1.0.28 >= 2.0.0, < 2.0.53 >= 3.0.0, < 3.0.51

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx github.com: https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac github.com: https://github.com/phpseclib/phpseclib/releases/tag/1.0.28 github.com: https://github.com/phpseclib/phpseclib/releases/tag/2.0.53 github.com: https://github.com/phpseclib/phpseclib/releases/tag/3.0.51