Skip to content
RedCVE

CVE-2026-84308Phpseclib vulnerability

phpseclibPublished:

CVSS score

6.3

Medium

CVSS 3.1 from github.com

Exploit probability (EPSS)

0.33%

0.33% chance of exploitation in the next 30 days, higher than 26.3% of all CVEs.

CISA KEV

Not in KEV

No confirmed exploitation reported by CISA so far.

Official 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.

Source: NVD · CNA: security-advisories@github.com

How to fix it, step by step

  1. Check whether you're affected

    Find every system running Phpseclib and compare its version with the affected versions.

  2. Update to a fixed version

    • Update Phpseclib to 3.0.57, 4.0.1 or later, on the branch you run.
  3. Confirm the fix

    Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.

Was this useful?

How it can be exploited

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Values in red make the vulnerability easier to exploit or more damaging. CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected products

Affected productsVersions
phpseclib Phpseclib< 3.0.57 · >= 4.0.0, < 4.0.1

Weakness

Timeline

  1. Published:
  2. Last modified:

Frequently asked questions

Is CVE-2026-84308 being exploited?

There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.3% probability of exploitation in the next 30 days.

What is the CVSS score of CVE-2026-84308?

CVE-2026-84308 has a CVSS 3.1 base score of 6.3 (medium).

Which versions are affected?

Phpseclib Phpseclib (< 3.0.57; >= 4.0.0, < 4.0.1)

Is there a patch for CVE-2026-84308?

The official record links to vendor advisories or patches; see “What to do” above.

References

Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.