ADVISORIES

Vulnerability

CVE-2026-84308

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.

9 advisories report this vulnerability, across 5 ecosystems.

Advisories

  • CGA-7f47-qmf7-588j
    CVE-2026-84308 ChainguardWolfi Updated 5 November 2026
  • CGA-9g4q-9xpg-p4gj
    CVE-2026-84308 Chainguard Updated 5 November 2026
  • CGA-fqv4-xpg7-59mh
    CVE-2026-84308 Chainguard Updated 5 November 2026
  • CGA-jgf4-9m5q-4cc6
    CVE-2026-84308 Chainguard Updated 5 November 2026
  • CGA-r68v-39j5-fxgj
    CVE-2026-84308 ChainguardWolfi Updated 5 November 2026
  • CGA-xx37-c6fx-7p5m
    CVE-2026-84308 Chainguard Updated 5 November 2026
  • DEBIAN-CVE-2026-84308

    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()…

    CVE-2026-84308 Debian Updated 1 October 2026
  • GHSA-q97c-8qh3-fpc6

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

    Moderate CVE-2026-84308 Packagist Updated 29 September 2026
  • UBUNTU-CVE-2026-84308

    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()…

    CVE-2026-84308 Ubuntu Updated 15 November 2026

References