Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
phpseclib phpseclib
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

phpseclib是phpseclib开源的一个 PHP 安全通信库。 phpseclib 3.0.51之前版本、2.0.53之前版本和1.0.28之前版本存在安全漏洞,该漏洞源于phpseclibNetSSH2::get_binary_packet()使用PHP的!=运算符比较接收到的SSH数据包HMAC与本地计算的HMAC,存在可变时间比较问题。

CVSS 3.7 · Low EPSS 0.37% · P28

Affected Version Matrix 3

VendorProduct Version RangeStatus
phpseclib phpseclib >= 0.1.1, < 1.0.28 affected
>= 2.0.0, < 2.0.53 affected
>= 3.0.0, < 3.0.51 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-40194

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
通过时间差异性导致的信息暴露
Source: CVE Program / CVE List V5
Vulnerability Title
phpseclib 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
phpseclib是phpseclib开源的一个 PHP 安全通信库。 phpseclib 3.0.51之前版本、2.0.53之前版本和1.0.28之前版本存在安全漏洞,该漏洞源于phpseclibNetSSH2::get_binary_packet()使用PHP的!=运算符比较接收到的SSH数据包HMAC与本地计算的HMAC,存在可变时间比较问题。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
phpseclib phpseclib >= 0.1.1, < 1.0.28 -

II. Public POCs for CVE-2026-40194

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-40194

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-40194 (3)

Vendor Advisories for CVE-2026-40194 (1)

Vendor Pages for CVE-2026-40194 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-40194

No comments yet


Leave a comment