CVE-2026-84308

EUVD-2026-69576
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.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
GitHub_MCNA
6.3 MEDIUM
LOCAL
HIGH
LOW
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Base Score
CVSS 3.x
EPSS Score
Percentile: 24.15%
Early Detection
Affected products identified ahead of NVD analysis through intelligence sources.
VendorProductVersionSource
phpseclibphpseclib
𝑥
< 3.0.57
CNA
Debian logo
Debian Releases
Debian Product
Codename
php-phpseclib
bookworm
2.0.42-1+deb12u5
fixed
bookworm (security)
2.0.42-1+deb12u3
fixed
forky
2.0.55-1
fixed
sid
2.0.55-1
fixed
trixie
2.0.48-3+deb13u3
fixed
trixie (security)
2.0.48-3+deb13u1
fixed
php-phpseclib3
bookworm
postponed
bookworm (security)
vulnerable
forky
3.0.57-1
fixed
sid
3.0.57-1
fixed
trixie
no-dsa
trixie (security)
vulnerable
php-phpseclib4
forky
4.0.1-1
fixed
sid
4.0.2-1
fixed
phpseclib
bookworm
1.0.20-1+deb12u5
fixed
bookworm (security)
1.0.20-1+deb12u3
fixed
sid
1.0.30-1
fixed
trixie
1.0.23-6+deb13u3
fixed
trixie (security)
1.0.23-6+deb13u1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
phpseclib
bionic
needs-triage
focal
needs-triage
jammy
needs-triage
noble
needs-triage
resolute
needs-triage
xenial
needs-triage
php-phpseclib
bionic
needs-triage
focal
needs-triage
jammy
needs-triage
noble
needs-triage
resolute
needs-triage
xenial
needs-triage
php-phpseclib3
jammy
needs-triage
noble
needs-triage
resolute
needs-triage