CVE-2026-84308

Description

A flaw was found in phpseclib, a PHP secure communications library. This vulnerability arises from non-constant-time X25519 scalar multiplication, where data-dependent conditional modular reductions create observable timing differences or variations in libgmp call counts. A local attacker, capable of resolving individual ladder steps, can exploit this by observing these differences during operations involving a reused or long-lived X25519 private key. Successful exploitation leads to the full recovery of the private key, compromising any operations that rely on it.

Statement

Red Hat Product Security has determined that this vulnerability does not affect any currently supported Red Hat product. This assessment may evolve based on further analysis and discovery. For more information about this vulnerability and the products it affects, please see the linked references.

Mitigation

To mitigate this issue, ensure the `php-sodium` package is installed and enabled. This allows phpseclib to use the native X25519 scalar multiplication engine, which is not vulnerable to this timing side-channel. After installing `php-sodium`, a restart of the web server or PHP-FPM service may be required for the changes to take effect. If `php-sodium` cannot be installed, applications should avoid reusing X25519 private keys for long-term operations.

Understanding the Weakness (CWE)

Confidentiality,Access Control

Technical Impact: Read Application Data; Bypass Protection Mechanism

Frequently Asked Questions

Want to get errata notifications? Sign up here.