Skip to content
CVE Tracker
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
Back

CVE-2026-40194

phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()

Low3.7EPSS 0.36%
Published
Updated
Reserved
Assigned by
GitHub_M

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.

Scores

CVSS scores of CVE-2026-40194, by who scored it
Scored byCVSSScoreVector
GitHub_MCNA (assigner)3.1Low3.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
NVDNVD · Modified3.1Low3.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS (exploitation in 30 days)
0.36% · top 70% of all CVEs (6 Nov 2026)
CISA SSVC
Exploitation: poc · Automatable: no · Technical impact: partial
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: Low 3.7.

Weakness

Affected products

  • phpseclib · phpseclib

    • affected >= 0.1.1, < 1.0.28
    • affected >= 2.0.0, < 2.0.53
    • affected >= 3.0.0, < 3.0.51

Affected packages

From reviewed advisories of the GitHub Advisory Database.

References (5)

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2026-40194 badge
[![CVE-2026-40194](https://trackcve.app/badge/CVE-2026-40194.svg)](https://trackcve.app/cve/CVE-2026-40194)

Record last updated .