Php phpseclib: Prior to 3.0.57 and 4.0.1, pure-PHP X25519 scalar multiplication in phpseclib/Math/PrimeField/Integer.php performs data-dependent conditional… (CVE-2026-84308)
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.
CVSS v3.1
Score 6.3medium
Affected software
pkg:deb/ubuntu/php5?arch=source&distro=esm-infra-legacy/trustypkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps-legacy/xenialpkg:deb/ubuntu/php7.2?arch=source&distro=esm-infra/bionicpkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/bionicpkg:deb/ubuntu/php7.4?arch=source&distro=esm-infra/focalpkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/focalpkg:deb/ubuntu/php8.1?arch=source&distro=jammypkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/jammypkg:deb/ubuntu/php8.3?arch=source&distro=noblepkg:deb/ubuntu/phpseclib?arch=source&distro=noblepkg:deb/ubuntu/php8.5?arch=source&distro=resolutepkg:deb/ubuntu/phpseclib?arch=source&distro=resolutepkg:deb/ubuntu/php-phpseclib?arch=source&distro=esm-apps-legacy/xenialpkg:deb/ubuntu/php-phpseclib?arch=source&distro=esm-apps/bionicpkg:deb/ubuntu/php-phpseclib?arch=source&distro=esm-apps/focalpkg:deb/ubuntu/php-phpseclib?arch=source&distro=esm-apps/jammypkg:deb/ubuntu/php-phpseclib3?arch=source&distro=esm-apps/jammypkg:deb/ubuntu/php-phpseclib?arch=source&distro=noblepkg:deb/ubuntu/php-phpseclib3?arch=source&distro=noblepkg:deb/ubuntu/php-phpseclib?arch=source&distro=resolutepkg:deb/ubuntu/php-phpseclib3?arch=source&distro=resolutepkg:deb/ubuntu/phpseclib?arch=source&distro=jammypkg:deb/ubuntu/php-phpseclib?arch=source&distro=esm-apps/noblepkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/noblepkg:deb/ubuntu/php-phpseclib?arch=source&distro=stonkingpkg:deb/ubuntu/php-phpseclib3?arch=source&distro=stonkingpkg:deb/ubuntu/phpseclib?arch=source&distro=stonkingpkg:deb/ubuntu/php-phpseclib?arch=source&distro=esm-apps/resolutepkg:deb/ubuntu/phpseclib?arch=source&distro=esm-apps/resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-84308
- Osv Schema Version
- 1.7.0
- Ecosystems
- ["Ubuntu:Pro:14.04:LTS","Ubuntu:Pro:16.04:LTS","Ubuntu:Pro:18.04:LTS","Ubuntu:Pro:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:Pro:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:26.04:LTS"]
Threat ID: 6a998f6dacd9273b491935e3
Added to database: 09/03/2026, 15:17:01 UTC
Last updated: 10/19/2026, 18:48:24 UTC
Views: 57
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.