Vulnerability Information
Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.
Vulnerability Title
phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery
Vulnerability 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 Information
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Vulnerability Type
通过时间差异性导致的信息暴露
Vulnerability Title
phpseclib 侧信道信息泄露漏洞
Vulnerability Description
phpseclib是phpseclib组织开源的一个提供加密算法与证书处理的库。 phpseclib 3.0.57之前版本和4.0.0至4.0.1之前版本存在侧信道信息泄露漏洞,该漏洞源于纯PHP X25519标量乘法中的数据依赖条件模约减,产生时序和libgmp调用计数差异,可能泄露复用的X25519私钥,导致使用该密钥的操作被永久破坏。
CVSS Information
N/A
Vulnerability Type
N/A