Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Lifecycle Timeline
4DescriptionGitHub Advisory
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.
AnalysisAI
phpseclib's SSH2 packet authentication uses PHP's non-constant-time != operator to compare HMACs, enabling timing-based information disclosure attacks on SSH sessions. The vulnerability affects phpseclib versions prior to 1.0.28, 2.0.53, and 3.0.51. An unauthenticated remote attacker can exploit variable-time comparison behavior to infer valid HMAC values through precise timing measurements, potentially compromising the confidentiality of SSH communications. No public exploit code or active exploitation has been confirmed, but this is a cryptographic timing vulnerability with proven scalability via benchmarking.
Technical ContextAI
phpseclib implements SSH protocol functionality via the Net\SSH2 class, which validates packet integrity using HMAC-based authentication codes. The vulnerability resides in the get_binary_packet() method, which employs PHP's != operator for HMAC comparison. In PHP, the != operator on binary strings of equal length internally uses the C memcmp() function, which performs byte-by-byte comparison and exits immediately upon finding the first differing byte. This short-circuit behavior creates a measurable timing side-channel (CWE-208: Observable Timing Discrepancy): valid HMACs require memcmp() to compare all bytes before returning false, while invalid HMACs with differing early bytes return faster. By measuring response latency across many SSH packets with systematically varied HMACs, an attacker can narrow the valid HMAC byte-by-byte, reducing computational complexity from 2^(HMAC_length) to roughly 256 * HMAC_length attempts. The affected CPE (cpe:2.3:a:phpseclib:phpseclib) spans all installations prior to the patched releases.
RemediationAI
Vendor-released patches are available: upgrade to phpseclib 1.0.28 or later, 2.0.53 or later, or 3.0.51 or later, depending on the current major version in use. Apply the patch immediately if phpseclib is used in SSH connections across untrusted networks or where attackers may control network latency measurements. Workarounds are not practical for this cryptographic issue; patching is required. Refer to the official security advisory at https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx and verify the patched release via https://github.com/phpseclib/phpseclib/releases (tags 1.0.28, 2.0.53, and 3.0.51). The underlying fix (commit ffe48b6b1b1af6963327f0a5330e3aa004a194ac) replaces the != operator with hash_equals(), a constant-time comparison function.
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro
The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all
Same weakness CWE-208 – Observable Timing Discrepancy
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-21597
GHSA-r854-jrxh-36qx