CVE-2024-27354
An issue was discovered in phpseclib 1.x before 1.0.23, 2.x before 2.0.47, and 3.x before 3.0.36. An attacker can construct a malformed certificate containing an extremely large prime to cause a denial of service (CPU consumption for an isPrime primality check). NOTE: this issue was introduced when attempting to fix CVE-2023-27560.
What to do
Fixed builds are available from Debian, Packagist, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | php-phpseclib3 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | php-phpseclib | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | php-phpseclib3 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | phpseclib | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | php-phpseclib3 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | php-phpseclib | Fix pending | 2.0.36-1ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 22.04 | php-phpseclib3 | Fix pending | 3.0.13-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 22.04 | phpseclib | Fixed | 1.0.20-1+deb12u3build0.22.04.1 | UBUNTU-CVE-2024-27354 |
| Ubuntu 20.04 | php-phpseclib | Fix pending | 2.0.23-2ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 20.04 | phpseclib | Fix pending | 1.0.18-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 18.04 | php-phpseclib | Fix pending | 2.0.9-1ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 18.04 | phpseclib | Fix pending | 1.0.9-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 16.04 | php-phpseclib | Fix pending | 2.0.1-1ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 16.04 | phpseclib | Fix pending | 1.0.1-3ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-27354 |
| Ubuntu 14.04 | phpseclib | Fix pending | ||
| Debian 14 | php-phpseclib | Fixed | 2.0.47-1 | DEBIAN-CVE-2024-27354 |
| Debian 14 | php-phpseclib3 | Fixed | 3.0.36-1 | DEBIAN-CVE-2024-27354 |
| Debian 13 | php-phpseclib | Fixed | 2.0.47-1 | DEBIAN-CVE-2024-27354 |
| Debian 13 | php-phpseclib3 | Fixed | 3.0.36-1 | DEBIAN-CVE-2024-27354 |
| Debian 13 | phpseclib | Fixed | 1.0.23-1 | DEBIAN-CVE-2024-27354 |
| Debian 12 | php-phpseclib | Fixed | 2.0.42-1+deb12u2 | DEBIAN-CVE-2024-27354 |
| Debian 12 | php-phpseclib3 | Fixed | 3.0.19-1+deb12u3 | DEBIAN-CVE-2024-27354 |
| Debian 12 | phpseclib | Fixed | 1.0.20-1+deb12u2 | DEBIAN-CVE-2024-27354 |
| Packagist library | phpseclib/phpseclib | Fixed | 3.0.36 | GHSA-2528-jw5q-ww88 |
References
- https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Math/PrimeField.php#L49
- https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
- https://lists.debian.org/debian-lts-announce/2024/03/msg00002.html
- https://lists.debian.org/debian-lts-announce/2024/03/msg00003.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.