CVE-2026-84308
phpseclib is a PHP secure communications library. Prior to 3.0.57 and 4.0.1, pure-PHP X25519 scalar multiplication in phpseclib/Math/PrimeField/Integer.php performs data-dependent conditional modular reductions in add() and subtract(). During the Montgomery ladder in phpseclib/Crypt/EC/BaseCurves/Montgomery.php, the reduction behavior of each step depends on the secret scalar prefix, creating per-step timing and libgmp call-count observations that can reveal a reused 251-bit clamped private scalar. The phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php derivation path invokes the pure-PHP multiplication without a native-engine check, while phpseclib/Crypt/EC/Formats/Keys/PKCS8.php reaches it when ext-sodium is unavailable. Exploitation requires a reused or long-lived X25519 private key, knowledge of the corresponding public key, execution of the pure-PHP path, and a local observer capable of resolving individual ladder steps or libgmp entry-point calls. Ephemeral X25519 keys, including phpseclib's normal SSH exchange path, are not affected. Recovery of the scalar permanently compromises operations that reuse that key. This issue is fixed in versions 3.0.57 and 4.0.1.
Scoring
- Severity
- MEDIUM
- CVSS base score
- 6.3
- CVSS vector
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
- EPSS probability
- 0.21%
- CWE
- CWE-208, CWE-385
- Published
- 2026-09-01
- Last modified
- 2026-09-03
Affected products
- phpseclib phpseclib
- phpseclib phpseclib
Weakness type
Related vulnerabilities
- CVE-2026-87737 — An issue was discovered in the mirage-crypto-ec package before 2.4.0 for OCaml. There is a timing...
- CVE-2026-16037 — Callback Authentication Bypass via Timing Attack in PayTR's PayTR Virtual Pos iFrame API (v9x) WHMCS Module
- CVE-2026-81159 — Commerce CyberSource - Moderately critical - Insufficient input validation - SA-CONTRIB-2026-106
- CVE-2026-82449 — Cockpit CMS before 2.14.1 Account Enumeration via Auth Timing
- CVE-2026-55785 — free5GC AUSF uses non-constant-time authentication comparisons and logs XRES* in 5G-AKA
- CVE-2026-78500 — Dimension Blind SSRF via Database Test Connection Feature
- CVE-2026-80199 — Kimai before 2.54.0 Username Enumeration via Timing Oracle
- CVE-2026-18259 — Token Content Access - Moderately critical - Access bypass - SA-CONTRIB-2026-090