Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpseclib/phpseclib
  4. ›
  5. CVE-2023-27560

CVE-2023-27560: phpseclib Infinite Loop vulnerability

March 3, 2023 (updated March 6, 2025)

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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2023-27560.yaml
  • github.com/advisories/GHSA-hm7p-r324-hhf3
  • github.com/phpseclib/phpseclib
  • github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440
  • github.com/phpseclib/phpseclib/commit/6298d1cd55c3ffa44533bd41906caec246b60440
  • github.com/phpseclib/phpseclib/releases/tag/3.0.19
  • nvd.nist.gov/vuln/detail/CVE-2023-27560

Code Behaviors & Features

Detect and mitigate CVE-2023-27560 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.0 before 3.0.19

Fixed versions

  • 3.0.19

Solution

Upgrade to version 3.0.19 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

packagist/phpseclib/phpseclib/CVE-2023-27560.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:15 +0000.