{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-84308",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2026-09-01T16:17:43.078Z",
        "datePublished": "2026-09-01T19:28:09.378Z",
        "dateUpdated": "2026-09-01T19:28:09.378Z"
    },
    "containers": {
        "cna": {
            "title": "phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-208",
                            "lang": "en",
                            "description": "CWE-208: Observable Timing Discrepancy",
                            "type": "CWE"
                        }
                    ]
                },
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-385",
                            "lang": "en",
                            "description": "CWE-385: Covert Timing Channel",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "attackComplexity": "HIGH",
                        "attackVector": "LOCAL",
                        "availabilityImpact": "NONE",
                        "baseScore": 6.3,
                        "baseSeverity": "MEDIUM",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "privilegesRequired": "LOW",
                        "scope": "UNCHANGED",
                        "userInteraction": "NONE",
                        "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N",
                        "version": "3.1"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-q97c-8qh3-fpc6",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-q97c-8qh3-fpc6"
                },
                {
                    "name": "https://github.com/phpseclib/phpseclib/commit/fb56bc5bb9009b54a6c26b31aeec8ed944f17373",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/phpseclib/phpseclib/commit/fb56bc5bb9009b54a6c26b31aeec8ed944f17373"
                },
                {
                    "name": "https://github.com/phpseclib/phpseclib/releases/tag/3.0.57",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/phpseclib/phpseclib/releases/tag/3.0.57"
                },
                {
                    "name": "https://github.com/phpseclib/phpseclib/releases/tag/4.0.1",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/phpseclib/phpseclib/releases/tag/4.0.1"
                }
            ],
            "affected": [
                {
                    "vendor": "phpseclib",
                    "product": "phpseclib",
                    "versions": [
                        {
                            "version": "< 3.0.57",
                            "status": "affected"
                        },
                        {
                            "version": ">= 4.0.0, < 4.0.1",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2026-09-01T19:28:09.378Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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": {
                "advisory": "GHSA-q97c-8qh3-fpc6",
                "discovery": "UNKNOWN"
            }
        }
    }
}