Bug 2457470 (CVE-2026-40194)

Summary: CVE-2026-40194 phpseclib: phpseclib: Information disclosure via timing attack in SSH HMAC comparison
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in phpseclib, a PHP secure communications library. This vulnerability involves a timing attack where the comparison of Secure Shell (SSH) packet integrity checks (HMACs) takes a variable amount of time. A remote attacker could exploit this timing difference to deduce information about the HMAC. This information disclosure could potentially compromise the security of SSH communications.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2457811, 2457812, 2457809, 2457810    
Bug Blocks:    

Description OSIDB Bzimport 2026-04-10 21:01:40 UTC
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.