Vulnerabilities

CVE-2026-40194

Low 3.7 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-04-10
Last modified
2026-06-17
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Scored by
security-advisories@github.com
Probability of exploitation
0.4 % higher than 29 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Yes, see references

Affected products

Vendor Product Versions Status
Phpseclib Phpseclib ≤ 1.0.27 Affected
phpseclib phpseclib (Packagist) ≥ 0.1.1, < 1.0.28 Affected
Phpseclib Phpseclib ≥ 2.0.0, < 2.0.53 Affected
phpseclib phpseclib (Packagist) ≥ 2.0.0, < 2.0.53 Affected
Phpseclib Phpseclib ≥ 3.0.0, < 3.0.51 Affected
phpseclib phpseclib (Packagist) ≥ 3.0.0, < 3.0.51 Affected

Weakness type

  • CWE-208: Observable Timing Discrepancy

    Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a par…

Attack techniques

Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK. This shows which techniques the weakness class is historically used for. It does not assert that this vulnerability has been exploited that way.

  • T1082: System Information Discovery discovery
  • T1592.002: Software reconnaissance

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities