CVE-2023-27560
phpseclib Infinite Loop vulnerability
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
- Record
CVE-2023-27560- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
CVE List
7.5
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
- Record
CVE-2023-27560- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
EUVDEUVD-2023-1036
7.5
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
- Record
EUVD-2023-1036- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-hm7p-r324-hhf3
7.5
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.
- Record
GHSA-hm7p-r324-hhf3- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
OSV
7.5
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
- Record
CVE-2023-27560- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2023-27560
7.5
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
- Record
DEBIAN-CVE-2023-27560- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-hm7p-r324-hhf3
7.5
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.
- Record
GHSA-hm7p-r324-hhf3- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2023-27560
7.5
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.
- Record
UBUNTU-CVE-2023-27560- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
phpseclib/phpseclibPackagist |
3.0.0 up to 3.0.19 | 3.0.19 |
php-phpseclib3Debian:12 |
before 3.0.19-1 | 3.0.19-1 |
php-phpseclib3Debian:13 |
before 3.0.19-1 | 3.0.19-1 |
php-phpseclib3Debian:14 |
before 3.0.19-1 | 3.0.19-1 |
phpseclib/phpseclibPackagist |
3.0.0 up to 3.0.19, plus listed versions 3.0.13.0.103.0.113.0.123.0.13 Show 13 moreShow less3.0.143.0.153.0.163.0.173.0.183.0.23.0.33.0.43.0.53.0.63.0.73.0.83.0.9 |
3.0.19 |
ldap-account-managerUbuntu:16.04:LTS |
All versions, plus listed versions 4.9-15.1-15.2-15.2-1ubuntu1 |
None known |
php-phpseclibUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 2.0.1-12.0.1-1build12.0.1-1ubuntu0.1~esm12.0.1-1ubuntu0.1~esm2 |
None known |
ldap-account-managerUbuntu:18.04:LTS |
All versions, plus listed versions 5.7-16.1-16.2-1 |
None known |
php-phpseclibUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 2.0.6-12.0.7-12.0.9-12.0.9-1ubuntu0.1~esm22.0.9-1ubuntu0.1~esm3 |
None known |
ldap-account-managerUbuntu:20.04:LTS |
All versions, plus listed versions 6.7-1 |
None known |
Show 15 moreShow less
| Package | Affected | Fixed |
|---|---|---|
php-phpseclibUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 2.0.21-22.0.23-22.0.23-2ubuntu0.1~esm22.0.23-2ubuntu0.1~esm3 |
None known |
ldap-account-managerUbuntu:22.04:LTS |
All versions, plus listed versions 7.5-17.7-1 |
None known |
php-phpseclibUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 2.0.30-2ubuntu12.0.34-12.0.35-12.0.36-12.0.36-1ubuntu0.1~esm22.0.36-1ubuntu0.1~esm3 |
None known |
php-phpseclib3Ubuntu:Pro:22.04:LTS |
All versions, plus listed versions 3.0.9-13.0.10-13.0.12-23.0.13-13.0.13-1ubuntu0.1~esm1 |
None known |
ldap-account-managerUbuntu:24.04:LTS |
All versions, plus listed versions 8.3-18.5-1 |
None known |
php-phpseclib3Ubuntu:24.04:LTS |
All versions, plus listed versions 3.0.21-23.0.33-13.0.34-13.0.35-13.0.37-1 |
None known |
php-phpseclibUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 2.0.44-12.0.45-12.0.46-12.0.47-12.0.47-1ubuntu0.1~esm1 |
None known |
ldap-account-managerUbuntu:25.10 |
All versions, plus listed versions 9.0-1 |
None known |
php-phpseclibUbuntu:25.10 |
All versions, plus listed versions 2.0.48-3 |
None known |
php-phpseclib3Ubuntu:25.10 |
All versions, plus listed versions 3.0.43-2 |
None known |
php-phpseclibUbuntu:26.10 |
All versions, plus listed versions 2.0.51-12.0.54-12.0.55-1 |
None known |
php-phpseclib3Ubuntu:26.10 |
All versions, plus listed versions 3.0.49-1ubuntu13.0.57-1 |
None known |
ldap-account-managerUbuntu:26.04:LTS |
All versions, plus listed versions 9.0-19.0-1build1 |
None known |
php-phpseclib3Ubuntu:26.04:LTS |
All versions, plus listed versions 3.0.43-23.0.44-13.0.47-13.0.49-13.0.49-1ubuntu1 |
None known |
php-phpseclibUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 2.0.48-32.0.49-12.0.51-12.0.51-1ubuntu0.1~esm1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-27560 is a high vulnerability (CVSS 7.5) in Phpseclib, published March 3, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.81%, the 57th percentile. Fixed in phpseclib/phpseclib 3.0.19.
References
github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440
github.com/phpseclib/phpseclib/releases/tag/3.0.19
nvd.nist.gov/vuln/detail/CVE-2023-27560
github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2023-27560.yaml
github.com/advisories/GHSA-hm7p-r324-hhf3
github.com/CVEProject/cvelistV5/tree/main/cves/2023/27xxx/CVE-2023-27560.json