HighGHSA-hm7p-r324-hhf3CVE-2023-27560

phpseclib Infinite Loop vulnerability

Published 3 Mar 2023 · Updated 6 Mar 2025

Affected package

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.19

Details

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

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.