{"id":"CVE-2023-27560","aliases":["DEBIAN-CVE-2023-27560","EUVD-2023-1036","GHSA-hm7p-r324-hhf3","UBUNTU-CVE-2023-27560"],"status":"published","title":"phpseclib Infinite Loop vulnerability","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.00808,"percentile":0.57341,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-835"],"published":"2023-03-03T00:00:00Z","modified":"2026-10-28T02:30:39Z","fixes":[{"ecosystem":"Packagist","package":"phpseclib/phpseclib","fixed_in":["3.0.19"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"php-phpseclib3","fixed_in":["3.0.19-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"php-phpseclib3","fixed_in":["3.0.19-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"php-phpseclib3","fixed_in":["3.0.19-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"phpseclib/phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.19"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.19-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.19-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.19-1"}]}]},{"source":"osv","ecosystem":"Packagist","package":"phpseclib/phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.19"}]}],"versions":["3.0.0","3.0.1","3.0.10","3.0.11","3.0.12","3.0.13","3.0.14","3.0.15","3.0.16","3.0.17","3.0.18","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.9-1","5.1-1","5.2-1","5.2-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.1-1","2.0.1-1build1","2.0.1-1ubuntu0.1~esm1","2.0.1-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.7-1","6.1-1","6.2-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.6-1","2.0.7-1","2.0.9-1","2.0.9-1ubuntu0.1~esm2","2.0.9-1ubuntu0.1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.7-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.21-2","2.0.23-2","2.0.23-2ubuntu0.1~esm2","2.0.23-2ubuntu0.1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7.5-1","7.7-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.30-2ubuntu1","2.0.34-1","2.0.35-1","2.0.36-1","2.0.36-1ubuntu0.1~esm2","2.0.36-1ubuntu0.1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.9-1","3.0.10-1","3.0.12-2","3.0.13-1","3.0.13-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.3-1","8.5-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.21-2","3.0.33-1","3.0.34-1","3.0.35-1","3.0.37-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.44-1","2.0.45-1","2.0.46-1","2.0.47-1","2.0.47-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.0-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.48-3"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.43-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.51-1","2.0.54-1","2.0.55-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.49-1ubuntu1","3.0.57-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"ldap-account-manager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.0-1","9.0-1build1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"php-phpseclib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.43-2","3.0.44-1","3.0.47-1","3.0.49-1","3.0.49-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"php-phpseclib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.48-3","2.0.49-1","2.0.51-1","2.0.51-1ubuntu0.1~esm1"]}],"products":[{"vendor":"phpseclib","product":"phpseclib"}],"references":[{"url":"https://github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440","tags":["x_transferred","Patch","fix","web","report"]},{"url":"https://github.com/phpseclib/phpseclib/releases/tag/3.0.19","tags":["x_transferred","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27560","tags":["advisory"]},{"url":"https://github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440#commitcomment-103226722","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2023-27560.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-hm7p-r324-hhf3"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/27xxx/CVE-2023-27560.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-27560","tags":["advisory"]},{"url":"https://github.com/phpseclib/phpseclib","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2023-27560","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-27560","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2023-27560","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","status":"published","published":"2023-03-03T00:00:00Z","modified":"2025-03-06T20:19:00.544Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T14:35:26.63732Z"}],"euvd":[{"id":"EUVD-2023-1036","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","status":"published","published":"2023-03-03T00:00:00Z","modified":"2025-03-06T20:19:00Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T20:53:11.059252Z"}],"ghsa":[{"id":"GHSA-hm7p-r324-hhf3","title":"phpseclib Infinite Loop vulnerability","description":"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.","status":"published","published":"2023-03-03T06:30:17Z","modified":"2025-03-06T21:36:14Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T14:38:34.185137Z"}],"nvd":[{"id":"CVE-2023-27560","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","status":"published","published":"2023-03-03T06:15:08.653Z","modified":"2026-06-17T05:45:27.48Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T14:07:48.342507Z"}],"osv":[{"id":"CVE-2023-27560","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","status":"published","published":"2023-03-03T00:00:00Z","modified":"2026-10-28T02:30:39.452249945Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:31.135751Z"},{"id":"DEBIAN-CVE-2023-27560","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","status":"published","published":"2023-03-03T06:15:08.653Z","modified":"2026-10-26T18:00:45.861061738Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:39.679062Z"},{"id":"GHSA-hm7p-r324-hhf3","title":"phpseclib Infinite Loop vulnerability","description":"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.","status":"published","published":"2023-03-03T06:30:17Z","modified":"2025-03-06T22:04:44.653822Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T15:46:49.28217Z"},{"id":"UBUNTU-CVE-2023-27560","description":"Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields.","status":"published","published":"2023-03-03T06:15:00Z","modified":"2026-10-17T12:57:16.449044142Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:54:20.198616Z"}]}}
