phpseclib up to 3.0.56/4.0.0 X25519 Scalar Multiplication Integer.php add/subtract timing discrepancy

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.3$0-$5k0.00+

Summaryinfo

A vulnerability identified as problematic has been detected in phpseclib up to 3.0.56/4.0.0. Affected by this issue is the function add/subtract of the file phpseclib/Math/PrimeField/Integer.php of the component X25519 Scalar Multiplication. The manipulation leads to timing discrepancy. This vulnerability is referenced as CVE-2026-84308. The attack can only be performed from a local environment. No exploit is available.

Detailsinfo

A vulnerability was found in phpseclib up to 3.0.56/4.0.0 and classified as problematic. This issue affects the function add/subtract of the file phpseclib/Math/PrimeField/Integer.php of the component X25519 Scalar Multiplication. The manipulation with an unknown input leads to a timing discrepancy vulnerability. Using CWE to declare the problem leads to CWE-208. Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. Impacted is confidentiality. The summary by CVE is:

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.

The advisory is shared at github.com. The identification of this vulnerability is CVE-2026-84308 since 09/01/2026. The exploitation is known to be difficult. An attack has to be approached locally. Technical details are known, but no exploit is available. MITRE ATT&CK project uses the attack technique T1592 for this issue.

By approaching the search of inurl:phpseclib/Math/PrimeField/Integer.php it is possible to find vulnerable targets with Google Hacking.

Upgrading to version 3.0.57 or 4.0.1 eliminates this vulnerability.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Productinfo

Name

Version

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 4.4
VulDB Meta Temp Score: 4.3

VulDB Base Score: 2.5
VulDB Temp Score: 2.4
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 6.3
CNA Vector (GitHub_M): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Timing discrepancy
CWE: CWE-208 / CWE-203 / CWE-200
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: No

Availability: 🔒
Status: Not defined
Google Hack: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: phpseclib 3.0.57/4.0.1

Timelineinfo

09/01/2026 Advisory disclosed
09/01/2026 +0 days CVE reserved
09/01/2026 +0 days VulDB entry created
09/01/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: github.com
Status: Confirmed

CVE: CVE-2026-84308 (🔒)
GCVE (CVE): GCVE-0-2026-84308
GCVE (VulDB): GCVE-100-397805

Entryinfo

Created: 09/01/2026 21:40
Changes: 09/01/2026 21:40 (65)
Complete: 🔍
Cache ID: 216::103

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!