Information Exposure Affecting phpseclib package, versions <1.0.28-1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.36% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-PHPSECLIB-16032373
  • published14 Apr 2026
  • disclosed10 Apr 2026

Introduced: 10 Apr 2026

CVE-2026-40194  (opens in a new tab)
CWE-208  (opens in a new tab)

How to fix?

Upgrade Debian:unstable phpseclib to version 1.0.28-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream phpseclib package and not the phpseclib package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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.