{"answers":{"affected":"4 open source packages ship an affected version, including phpseclib/phpseclib.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-84308 exists.","fix":"Upgrade phpseclib/phpseclib to a fixed version for your release line: 3.0.57 or 4.0.1.","what":"CVE-2026-84308 is a medium-severity vulnerability in phpseclib, published on 1 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-84308 and fix it if it is affected.\n\nWhat it is: CVE-2026-84308 is a medium-severity vulnerability in phpseclib, published on 1 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-84308 exists.\n\nAffected packages and fixed versions:\n- phpseclib/phpseclib (Packagist): affected all versions; fixed in 3.0.57\n- phpseclib/phpseclib (Packagist): affected all versions; fixed in 3.0.57\n- phpseclib/phpseclib (Packagist): affected from 4.0.0; fixed in 4.0.1\n- phpseclib/phpseclib (Packagist): affected from 4.0.0; fixed in 4.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-84308/ (Markdown: https://insights.sbomify.com/CVE-2026-84308/index.md)","id":"CVE-2026-84308","markdown":"https://insights.sbomify.com/CVE-2026-84308/index.md","name":"CVE-2026-84308","record":{"aliases":["DEBIAN-CVE-2026-84308","GHSA-q97c-8qh3-fpc6","MINI-c848-5gw4-2v8w","MINI-mp2x-7hpr-gw64","MINI-pm2h-3443-j64j","UBUNTU-CVE-2026-84308"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"PHP secure communications library","requires_auth":"low_privilege","summary":"Attackers can recover private X25519 keys via timing side-channels in pure-PHP scalar multiplication when keys are reused and native extensions are unavailable.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-385","name":"Covert Timing Channel"},{"id":"CWE-208","name":"Observable Timing Discrepancy"}],"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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery","id":"CVE-2026-84308","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"information_disclosure","year":"2026"},"n_packages":4,"n_references":4,"next":{"headline":"pypdf: Possible infinite loop for TreeObject.insert_child","id":"CVE-2026-84309"},"packages":[{"ecosystem":"Packagist","fixed":["3.0.57"],"introduced":["0"],"last_affected":[],"package":"phpseclib/phpseclib","purl":null,"source":"GHSA-q97c-8qh3-fpc6"},{"ecosystem":"Packagist","fixed":["3.0.57"],"introduced":["0"],"last_affected":[],"package":"phpseclib/phpseclib","purl":"pkg:composer/phpseclib/phpseclib","source":"GHSA-q97c-8qh3-fpc6"},{"ecosystem":"Packagist","fixed":["4.0.1"],"introduced":["4.0.0"],"last_affected":[],"package":"phpseclib/phpseclib","purl":null,"source":"GHSA-q97c-8qh3-fpc6"},{"ecosystem":"Packagist","fixed":["4.0.1"],"introduced":["4.0.0"],"last_affected":[],"package":"phpseclib/phpseclib","purl":"pkg:composer/phpseclib/phpseclib","source":"GHSA-q97c-8qh3-fpc6"}],"prev":{"headline":"Filament: Password validity disclosure for accounts denied panel access on login page","id":"CVE-2026-84307"},"products":["phpseclib"],"published":"2026-09-01","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-09-03","vendors":["phpseclib"]},"summary":"Attackers can recover private X25519 keys via timing side-channels in pure-PHP scalar multiplication when keys are reused and native extensions are unavailable.","url":"https://insights.sbomify.com/CVE-2026-84308/"}