Cyber Resilience

CVE-2026-40194

Phpseclib ≤ 1.0.27

Published
10 April 2026
Modified
08 May 2026
Patch / advisory
CVSS Score v3.1 3.7
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS Score 0.0036 29th percentile
Risk Priority 16 floored blend · peak EPSS

Summary

CVE-2026-40194 is a low-severity Observable Timing Discrepancy (CWE-208) vulnerability in Phpseclib Phpseclib. Its CVSS base score is 3.7 (Low).

Operationally, exploitation aligns with the MITRE ATT&CK technique Adversary-in-the-Middle (T1557); ranked at the 29th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SC-13 (Cryptographic Protection) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1557 Adversary-in-the-Middle Credential Access
Adversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as [Network Sniffing](https://attack.
Why these techniques?

Timing side-channel in SSH HMAC verification enables an on-path adversary to forge valid packets and perform undetected injection/modification, directly facilitating Adversary-in-the-Middle attacks against SSH sessions.

Confidence: MEDIUM · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2026-32935Same product: Phpseclib Phpseclib
CVE-2023-27560Same product: Phpseclib Phpseclib
CVE-2026-55599Same product: Phpseclib Phpseclib
CVE-2023-52892Same product: Phpseclib Phpseclib
CVE-2023-49316Same product: Phpseclib Phpseclib
CVE-2024-27355Same product: Phpseclib Phpseclib
CVE-2024-27354Same product: Phpseclib Phpseclib
CVE-2026-44368Shared CWE-208
CVE-2025-52457Shared CWE-208
CVE-2026-27882Shared CWE-208

Affected Assets

phpseclib
phpseclib
≤ 1.0.27 · 2.0.0 — 2.0.53 · 3.0.0 — 3.0.51

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SC-13 Cryptographic Protection
  • SA-11 Developer Testing and Evaluation
  • SA-8 Security and Privacy Engineering Principles
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V11.2.4

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly requires correct implementation of cryptographic integrity mechanisms (HMAC comparison) rather than allowing variable-time operators.

prevent

Mandates developer security testing that can detect timing side-channel flaws such as non-constant-time HMAC verification.

prevent

Requires application of secure engineering principles that include constant-time algorithms for sensitive comparisons.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require constant-time implementations that eliminate observable timing discrepancies.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

none

Consistent reference clocks limit the attacker's ability to measure or manipulate timing differences that could reveal internal state or processing paths.

References