Skip to main content

PHP CVE-2026-40194

| EUVDEUVD-2026-21597 LOW
Observable Timing Discrepancy (CWE-208)
2026-04-10 GitHub_M GHSA-r854-jrxh-36qx
3.7
CVSS 3.1 · GitHub Advisory

Severity by source

GitHub Advisory PRIMARY
3.7 LOW
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Lifecycle Timeline

4
Patch released
Apr 11, 2026 - 02:30 nvd
Patch available
EUVD ID Assigned
Apr 10, 2026 - 21:00 euvd
EUVD-2026-21597
Analysis Generated
Apr 10, 2026 - 21:00 vuln.today
CVE Published
Apr 10, 2026 - 20:24 nvd
LOW 3.7

DescriptionGitHub Advisory

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.

AnalysisAI

phpseclib's SSH2 packet authentication uses PHP's non-constant-time != operator to compare HMACs, enabling timing-based information disclosure attacks on SSH sessions. The vulnerability affects phpseclib versions prior to 1.0.28, 2.0.53, and 3.0.51. An unauthenticated remote attacker can exploit variable-time comparison behavior to infer valid HMAC values through precise timing measurements, potentially compromising the confidentiality of SSH communications. No public exploit code or active exploitation has been confirmed, but this is a cryptographic timing vulnerability with proven scalability via benchmarking.

Technical ContextAI

phpseclib implements SSH protocol functionality via the Net\SSH2 class, which validates packet integrity using HMAC-based authentication codes. The vulnerability resides in the get_binary_packet() method, which employs PHP's != operator for HMAC comparison. In PHP, the != operator on binary strings of equal length internally uses the C memcmp() function, which performs byte-by-byte comparison and exits immediately upon finding the first differing byte. This short-circuit behavior creates a measurable timing side-channel (CWE-208: Observable Timing Discrepancy): valid HMACs require memcmp() to compare all bytes before returning false, while invalid HMACs with differing early bytes return faster. By measuring response latency across many SSH packets with systematically varied HMACs, an attacker can narrow the valid HMAC byte-by-byte, reducing computational complexity from 2^(HMAC_length) to roughly 256 * HMAC_length attempts. The affected CPE (cpe:2.3:a:phpseclib:phpseclib) spans all installations prior to the patched releases.

RemediationAI

Vendor-released patches are available: upgrade to phpseclib 1.0.28 or later, 2.0.53 or later, or 3.0.51 or later, depending on the current major version in use. Apply the patch immediately if phpseclib is used in SSH connections across untrusted networks or where attackers may control network latency measurements. Workarounds are not practical for this cryptographic issue; patching is required. Refer to the official security advisory at https://github.com/phpseclib/phpseclib/security/advisories/GHSA-r854-jrxh-36qx and verify the patched release via https://github.com/phpseclib/phpseclib/releases (tags 1.0.28, 2.0.53, and 3.0.51). The underlying fix (commit ffe48b6b1b1af6963327f0a5330e3aa004a194ac) replaces the != operator with hash_equals(), a constant-time comparison function.

More in PHP

View all
CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

CVE-2024-46506 CRITICAL POC
10.0 May 13

NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro

CVE-2024-8353 CRITICAL POC
9.8 Sep 28

The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all

Share

CVE-2026-40194 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy