CVEfocus › CVE database › CVE-2026-84308

CVE-2026-84308phpseclib — non-constant-time X25519 scalar multiplication permits full private-key…

CVSS 6.3 MediumEPSS 0.3% (higher than 18% of CVEs)Published 2026-09-01Updated 2026-09-03Assigner: GitHub_M

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.

CWE-208CWE-385

What to do

Fixed builds are available from Debian, Packagist: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
18Fix pending
2Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 26.10php-phpseclib3Fix pendingUBUNTU-CVE-2026-84308
Ubuntu 26.10phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 26.04php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 26.04php-phpseclib3Under investigationUBUNTU-CVE-2026-84308
Ubuntu 26.04phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 24.04php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 24.04php-phpseclib3Under investigationUBUNTU-CVE-2026-84308
Ubuntu 24.04phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 22.04php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 22.04php-phpseclib3Fix pendingUBUNTU-CVE-2026-84308
Ubuntu 22.04phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 20.04php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 20.04phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 18.04php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 18.04phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 16.04php-phpseclibFix pendingUBUNTU-CVE-2026-84308
Ubuntu 16.04phpseclibFix pendingUBUNTU-CVE-2026-84308
Debian 14php-phpseclib3Fixed3.0.57-1DEBIAN-CVE-2026-84308
Debian 14php-phpseclib4Fixed4.0.1-1DEBIAN-CVE-2026-84308
Debian 13php-phpseclib3Fix pendingDEBIAN-CVE-2026-84308
Debian 12php-phpseclib3Fix pendingDEBIAN-CVE-2026-84308
Packagist libraryphpseclib/phpseclibFixed4.0.1GHSA-q97c-8qh3-fpc6

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.