Php phpseclib: Prior to 3.0.57 and 4.0.1, pure-PHP X25519 scalar multiplication in
Affects php-phpseclibSource GCVE Database
Not known to be exploited · CVSS 6.3 Medium · fixed in 3.0.57 : update php-phpseclib when convenient.
Data as of 3 Dec 2026, 18:37 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 26% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.0.57, 4.0.1
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 1 Sep 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Dec 2026.
What to do
Upgrade phpseclib/phpseclib to 3.0.57; phpseclib/phpseclib to 4.0.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu Pro 14.04 LTSphp5pkg:deb/ubuntu/php5?arch=source&distro=esm-infra-legacy/trustyOther threats | Affected
| Fixed in– |
Ubuntu Pro 16.04 LTSphpseclibpkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps-legacy/xenialOther threats | Affected
| Fixed in– |
Ubuntu Pro 18.04 LTSphp7.2pkg:deb/ubuntu/php7.2?arch=source&distro=esm-infra/bionicOther threats | Affected
| Fixed in– |
Ubuntu Pro 18.04 LTSphpseclibpkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/bionicOther threats | Affected
| Fixed in– |
Ubuntu Pro 20.04 LTSphp7.4pkg:deb/ubuntu/php7.4?arch=source&distro=esm-infra/focalOther threats | Affected
| Fixed in– |
Ubuntu Pro 20.04 LTSphpseclibpkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/focalOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.