phpseclib/phpseclib is vulnerable to Observable Timing Discrepancy
63
Medium Risk
The pure-PHP implementation of X25519 scalar multiplication is not constant time. Field addition and subtraction perform data-dependent conditional modular reduction, so each Montgomery-ladder step takes time that depends on bits of the secret scalar. An observer able to measure per-step timing or libgmp call counts can recover the full X25519 private key, even using the standard base point and without chosen inputs. The fix blinds the Montgomery multiplication and adds constant-time handling so execution time no longer depends on private scalar bits.
You are affected if you are using a version that falls within the vulnerable range and you perform X25519 key exchange with a private key over the pure-PHP code path.
phpseclib/phpseclib is vulnerable to Observable Timing Discrepancy in versions 3.0.0 - 3.0.56 and 4.0.0 - 4.0.0.
Upgrade the phpseclib/phpseclib and/or the phpseclib library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.