CVE-2024-27354 phpseclib: guardrails needed on isPrime and randomPrime
An attacker can cause a denial of service via CPU exhaustion by submitting a malformed certificate with a large prime to the phpseclib library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-27354?
CVE-2024-27354 is a high-severity denial of service vulnerability in Debian Debian Linux, published on 1 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-400
Which versions are affected by CVE-2024-27354?
6 open source packages ship an affected version, including phpseclib/phpseclib. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
phpseclib/phpseclib Packagist | From 0.1.1 | 1.0.23 |
phpseclib/phpseclib Packagist | From 0.1.1 | 1.0.23 |
phpseclib/phpseclib Packagist | From 2.0.0 | 2.0.47 |
phpseclib/phpseclib Packagist | From 2.0.0 | 2.0.47 |
phpseclib/phpseclib Packagist | From 3.0.0 | 3.0.36 |
phpseclib/phpseclib Packagist | From 3.0.0 | 3.0.36 |
Products include Debian Debian Linux, Phpseclib Phpseclib.
How do I fix CVE-2024-27354?
Upgrade phpseclib/phpseclib to a fixed version for your release line: 1.0.23, 2.0.47 or 3.0.36.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-27354 being exploited?
There is no known exploitation of CVE-2024-27354 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as CLSA-2026-1783386122, DEBIAN-CVE-2024-27354, GHSA-2528-jw5q-ww88, UBUNTU-CVE-2024-27354.