CVE catalog

CVE-2026-84308

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

[CVE catalog]

Severity
Medium · CVSS 6.3CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.33% · Oct 22, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianphpseclibsid1.0.30-1not affected
Debianphpseclibtrixie1.0.23-6+deb13u3not affected
Debianphpseclibtrixie-security1.0.23-6+deb13u1not affected
Debianphpseclibbookworm1.0.20-1+deb12u5not affected
Debianphpseclibbookworm-security1.0.20-1+deb12u3not affected
Debianphp-phpseclibsid2.0.55-1not affected
Debianphp-phpseclibforky2.0.55-1not affected
Debianphp-phpseclibtrixie2.0.48-3+deb13u3not affected
Debianphp-phpseclibtrixie-security2.0.48-3+deb13u1not affected
Debianphp-phpseclibbookworm2.0.42-1+deb12u5not affected
Debianphp-phpseclibbookworm-security2.0.42-1+deb12u3not affected
Debianphp-phpseclib3sid3.0.57-1fixed
Debianphp-phpseclib3forky3.0.57-1fixed
Debianphp-phpseclib3trixie3.0.43-2+deb13u3vulnerable
Debianphp-phpseclib3trixie-security3.0.43-2+deb13u1vulnerable
Debianphp-phpseclib3bookworm3.0.19-1+deb12u6vulnerable
Debianphp-phpseclib3bookworm-security3.0.19-1+deb12u4vulnerable
Composerphpseclib/phpseclibNot reported4.0.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
DebianphpseclibsourcesidNot affectedunimportantNot reportedNot reported
DebianphpseclibsourcetrixieNot affectedunimportantNot reportedNot reported
DebianphpseclibsourcebookwormNot affectedunimportantNot reportedNot reported
Debianphp-phpseclibsourcesidNot affectedunimportantNot reportedNot reported
Debianphp-phpseclibsourceforkyNot affectedunimportantNot reportedNot reported
Debianphp-phpseclibsourcetrixieNot affectedunimportantNot reportedNot reported
Debianphp-phpseclibsourcebookwormNot affectedunimportantNot reportedNot reported
Debianphp-phpseclib3sourcesid3.0.57-1not yet assignedNot reportedNot reported
Debianphp-phpseclib3sourceforky3.0.57-1not yet assignedNot reportedNot reported
Debianphp-phpseclib3sourcetrixie(unfixed)not yet assignedNot reportedNot reported
Debianphp-phpseclib3sourcebookworm(unfixed)not yet assignedNot reportedNot reported
Composerphpseclib/phpseclibcomposerNot reported4.0.1Not reportedGHSA-Q97C-8QH3-FPC6Not reported

Notes

[trixie] php-phpseclib3: Minor issue [bookworm] php-phpseclib3: Minor issue, local side-channel attack

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [php-phpseclib3]Affected
    Details (4)
    • 3.0.19-1+deb12u6 · all · bookworm

      Affected

      nvd · php-phpseclib3 · debian · bookworm; nvd · php-phpseclib3 · debian · 12

    • 3.0.19-1+deb12u6 · all · bookworm

      Affected

      nvd · php-phpseclib3 · debian · bookworm; nvd · php-phpseclib3 · debian · 12

    • 3.0.19-1+deb12u4 · all · bookworm-security

      Affected

      nvd · php-phpseclib3 · debian · bookworm; nvd · php-phpseclib3 · debian · 12

    • 3.0.19-1+deb12u4 · all · bookworm-security

      Affected

      nvd · php-phpseclib3 · debian · bookworm; nvd · php-phpseclib3 · debian · 12

  • [php-phpseclib]Not affected
    Details (4)
    • 2.0.42-1+deb12u5 · all · bookworm

      Not affected

      nvd · php-phpseclib · debian · bookworm

    • 2.0.42-1+deb12u5 · all · bookworm

      Not affected

      nvd · php-phpseclib · debian · bookworm

    • 2.0.42-1+deb12u3 · all · bookworm-security

      Not affected

      nvd · php-phpseclib · debian · bookworm

    • 2.0.42-1+deb12u3 · all · bookworm-security

      Not affected

      nvd · php-phpseclib · debian · bookworm

  • [php-seclib]Not affected

    Source package: [phpseclib]

    Details (4)
    • 1.0.20-1+deb12u5 · all · bookworm

      Not affected

      nvd · phpseclib · debian · bookworm

    • 1.0.20-1+deb12u5 · all · bookworm

      Not affected

      nvd · phpseclib · debian · bookworm

    • 1.0.20-1+deb12u3 · all · bookworm-security

      Not affected

      nvd · phpseclib · debian · bookworm

    • 1.0.20-1+deb12u3 · all · bookworm-security

      Not affected

      nvd · phpseclib · debian · bookworm

[Debian 13 (Trixie)]

  • [php-phpseclib3]Affected
    Details (4)
    • 3.0.43-2+deb13u3 · all · trixie

      Affected

      nvd · php-phpseclib3 · debian · 13

    • 3.0.43-2+deb13u3 · all · trixie

      Affected

      nvd · php-phpseclib3 · debian · 13

    • 3.0.43-2+deb13u1 · all · trixie-security

      Affected

      nvd · php-phpseclib3 · debian · 13

    • 3.0.43-2+deb13u1 · all · trixie-security

      Affected

      nvd · php-phpseclib3 · debian · 13

Observed:

References