HighGHSA-hm7p-r324-hhf3CVE-2023-27560
phpseclib Infinite Loop vulnerability
Published 3 Mar 2023 · Updated 6 Mar 2025
Affected package
phpseclib/phpseclibComposer
- Affected
- >=3.0.0 <3.0.19
- Fixed in
- 3.0.19
Update to the fixed version for your release line, for example:
composer require phpseclib/phpseclib:^3.0.19Details
Math/PrimeField.php in phpseclib has an infinite loop with composite primefields. This vulnerability was introduced in version 3.0.0, and has been patched in 3.0.19. The CVE for this issue originally identified the the vulnerable version as 2.x, however, the vulnerable functionality was not introduced until version 3.
Is GHSA-hm7p-r324-hhf3 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected phpseclib/phpseclib, and gives you the command that fixes it.
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2023-27560
- Linkgithub.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440
- Linkgithub.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440#commitcomment-103226722
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2023-27560.yaml
- Packagegithub.com/phpseclib/phpseclib
- Linkgithub.com/phpseclib/phpseclib/releases/tag/3.0.19
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.