Quick answers
- Is CVE-2026-40194 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40194 being exploited in the wild.
- How severe is CVE-2026-40194?
- Low severity, with a CVSS score of 3.7, published 10 April 2026.
- Which products and versions are affected?
- phpseclib/phpseclib (Packagist) ECOSYSTEM:introduced=0.1.1,fixed=1.0.28.
- Is there a fix for CVE-2026-40194?
- Yes. phpseclib/phpseclib (Packagist): upgrade to 1.0.28 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40194 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-40194?
- Check whether you run phpseclib/phpseclib (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- phpseclib/phpseclib (Packagist): upgrade to 1.0.28 or later
composer require phpseclib/phpseclib:^1.0.28
Technical details
The phpseclib library's SSH2 implementation in `get_binary_packet()` uses PHP's `!=` operator to compare received SSH packet HMACs against locally computed HMACs. Because PHP's `!=` operator on equal-length binary strings utilizes `memcmp()`, it short-circuits upon encountering the first differing byte, creating an observable timing discrepancy (CWE-208). An attacker could potentially exploit this side-channel to conduct a timing attack, although practical exploitation is significantly hindered by SSH's default behavior of disconnecting upon MAC failure and the use of per-session keys. The vulnerability affects all non-AEAD ciphers (e.g., AES-CBC, AES-CTR) and is resolved by replacing the inequality operator with the constant-time `hash_equals()` function.
Affected products
- phpseclib phpseclib 0.1.1 to 1.0.27, 2.0.0 to 2.0.52, 3.0.0 to 3.0.50
Identifiers
- CVE-2026-40194
- GHSA-r854-jrxh-36qx
Timeline
- 2026-04-10: advisory: Vendor advisory and GHSA published
- 2026-04-10: patched: Fixed in versions 3.0.51, 2.0.53, and 1.0.28
References
- https://github.com/phpseclib/phpseclib/commit/ffe48b6b1b1af6963327f0a5330e3aa004a194ac
- https://github.com/phpseclib/phpseclib/releases/tag/1.0.28
- https://github.com/phpseclib/phpseclib/releases/tag/2.0.53
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.51
- https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx