phpseclib Infinite Loop vulnerability
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | phpseclib/phpseclib | >= 3.0.0, < 3.0.19 | 3.0.19 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-27560
- https://github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440
- https://github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440#commitcomment-103226722
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2023-27560.yaml
- https://github.com/phpseclib/phpseclib
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.19
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-835- Platform
- Composer
- Package
phpseclib/phpseclib- Disclosed
- 03.03.2023
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-hm7p-r324-hhf3 - CC BY 4.0
Vulnerability history: phpseclib/phpseclib
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 11
- First → latest
- 04.2021 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 8
- Medium 2
- Low 1
Disclosures per year
- 2021: 1
- 2022: 0
- 2023: 1
- 2024: 1
- 2025: 0
- 2026: 8
-
phpseclib Infinite Loop vulnerability this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.