Back to CVE records
Medium 6.3Published Sep 1, 2026

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

Updated under an hour ago ()

Does this affect you?

It affects phpseclib. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
6.3 MEDIUM (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Weakness (CWE)
CWE-208, CWE-385
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
GitHub_M
NVD analysis
Deferred
Record last updated
Sep 3, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
phpseclib phpseclib
phpseclib:phpseclib (from the name)
before 3.0.57; from 4.0.0, < 4.0.1
CNA record

References

  • x-refsource-confirm
  • x-refsource-misc
  • x-refsource-misc
  • x-refsource-misc

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.