CVE-2026-84308

Source
https://cve.org/CVERecord?id=CVE-2026-84308
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-84308.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-84308
Aliases
  • GHSA-q97c-8qh3-fpc6
Downstream
Published
2026-09-01T19:28:09.378Z
Modified
2026-09-03T03:48:17.965696146Z
Severity
  • 6.3 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84308.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-208",
        "CWE-385"
    ]
}
References

Affected packages

Git / github.com/phpseclib/phpseclib

Affected ranges

Type
GIT
Repo
https://github.com/phpseclib/phpseclib
Events
Database specific
Show details
{
    "source": [
        "AFFECTED_FIELD",
        "REFERENCES"
    ],
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "3.0.57"
        },
        {
            "introduced": "4.0.0"
        },
        {
            "fixed": "4.0.1"
        }
    ]
}

Affected versions

0.*
0.1.0
0.1.1
0.1.2
0.1.5
0.2.0
0.2.1
0.2.2
0.3.0
2.*
2.0.0
2.0.8
3.*
3.0.0
3.0.1
3.0.10
3.0.11
3.0.12
3.0.13
3.0.14
3.0.15
3.0.16
3.0.17
3.0.18
3.0.19
3.0.2
3.0.20
3.0.21
3.0.22
3.0.23
3.0.3
3.0.33
3.0.34
3.0.35
3.0.36
3.0.37
3.0.38
3.0.39
3.0.4
3.0.40
3.0.41
3.0.42
3.0.43
3.0.44
3.0.45
3.0.46
3.0.47
3.0.48
3.0.49
3.0.5
3.0.50
3.0.51
3.0.52
3.0.53
3.0.54
3.0.55
3.0.56
3.0.6
3.0.7
3.0.8
3.0.9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-84308.json"