CVE-2026-84308

phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery

MEDIUM
6.3
CVSS Score
Published: September 1, 2026 at 07:28 PM UTC
Updated: September 9, 2026 at 09:27 PM UTC
1 product affected across 1 vendorPhpseclib

Using phpseclib by phpseclib?

Get instant alerts when new vulnerabilities affect phpseclib - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.3
Exploit prediction
EPSS 0.3%
SSVC
PoC

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.0.57v < 4.0.1
Affected range stops below 3.0.57, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.0.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

6.3MEDIUMGitHub_M
Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-208CWE-385

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card